<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yet Another [À Compléter]</title>
	<atom:link href="http://blog.neteril.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.neteril.org</link>
	<description>Random thoughts of Jérémie Laval</description>
	<lastBuildDate>Tue, 02 Mar 2010 17:41:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Working on Mono with git-svn</title>
		<link>http://blog.neteril.org/2010/03/02/working-on-mono-with-git-svn/</link>
		<comments>http://blog.neteril.org/2010/03/02/working-on-mono-with-git-svn/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 00:23:17 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.neteril.org/?p=804</guid>
		<description><![CDATA[<p align="center"><img class="size-medium wp-image-807 " title="469147755_bfa4e757de_b" src="http://blog.neteril.org/wp-content/uploads/2010/03/469147755_bfa4e757de_b.jpg" alt="CC by-nd by W. T. L." width="450" height="300" /><br /><span style="text-align: center">CC by-nd by <a href="http://www.flickr.com/people/wtlphotos/">W. T. L.</a></span></p>
<p>I won&#8217;t go here in depth on how to use git, the official hub has already <a href="http://git-scm.com/documentation">tutorials</a> to get you started. I&#8217;m more interested here in the workflow you can apply and the tools you can use when working on Mono with git-svn (although it can be mostly used in a general way too).</p>
<p>Note: this post is heavily based on the <a href="http://www.mono-project.com/Accessibility:_GitSVN:_Workflow">materials</a> written by the accessibility team.</p>
<p>Note²: Prior of everything, your should first read <a href="http://mono-project.com/GitSVN">this guide</a> which explains how to setup your git-svn local copy using an existing git mirror. At this point, I expect that you have successfully completed that step.</p>
<h2>Mirroring your work</h2>
<p>The workflow I will describe here is rather destructive as you are going to end up merging some bits of git history when sending your commit to Subversion. As such, I strongly advise that you have another git mirror of your work somewhere to act as a backup with all your history.</p>
<p>You could either go public with your own <a href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way">server</a>/<a href="http://repo.or.cz/">repo.or.cz</a>/<a href="http://github.com/">github</a>/<a href="http://gitorious.org/">gitorious</a>/whatever or simply use a local copy situated e.g. on another drive.</p>
<p>In any case, this repository is not really meant for public consumption (i.e. people directly working on your git tree) as it&#8217;s going to be quite unstable with frequent history breaks.</p>
<p>When you are decided on where you want to host your mirror, add a remote to its location with the <code>git remote</code> command :</p>
<blockquote>
<pre>git remote add name foo@yourdomain.org:mcs.git</pre>
</blockquote>
<p>When you want to update your remote copy, just issue git push with the remote name and mirror option :</p>
<blockquote>
<pre>git push --mirror name</pre>
</blockquote>
<h2>Synchronizing with trunk</h2>
<p>The first thing to know is actually how to pull Subversion revisions back into your local repository. As with any command that have to deal with Subversion, the common prefix to use is <code>git svn</code>. This action must be done on the master branch so if you are on another one, switch back to master before doing anything else with <code>git checkout</code>.</p>
<p>Here, the command we are interested in is <code>git svn rebase</code>. This command will actually fetch the revisions from trunk, convert them to git commits and replay your local changes (if any) on top of them :</p>
<blockquote>
<pre>git svn rebase</pre>
</blockquote>
<h2>Making changes</h2>
<p>The equivalent of trunk in git is the master branch. This branch should remain clean of any change and should only be used when you are ready to commit your work to Subversion.</p>
<p>In git, branches are everywhere and are the most straightforward way to organize your changes hierarchically. As such, anything you plan to do should be separated in its own branch with a name like feature-xyz. You can also have feature branch that depends on another feature branch, I will talk about these one later and especially how to merge them back.</p>
<p>The command :</p>
<blockquote>
<pre>git checkout -b feature-xyz</pre>
</blockquote>
<p>Will switch you to a new branch where you can happily do your stuff.</p>
<p>What works well here is to follow the scheme : code a piece → commit → test → fix → commit. It will especially helps when you have to crawl back through your history at a later point with, for instance,<code> git bissect</code>.</p>
<p>Notice that commit message style at this point don&#8217;t matter, use the style that suit you the best because you are the only one who will read them.</p>
<p>During the lifetime of your development branch, it&#8217;s likely that some change introduced in Subversion will conflict with what you have done. As such, it&#8217;s always a good idea to frequently sync your local copy with Subversion (see above) and then rebase your development branches on top of master.</p>
<p>The <code>git rebase</code> command exactly serves that purpose and allows to rewrite partially or totally the history of a branch. In practise, this is as simple as issuing from the development branch :</p>
<blockquote>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;">git rebase master</pre>
</blockquote>
<p>As you see, git rebase is powerful tool but it&#8217;s also a destructive one in the sense that it rewrite your history. Rewriting history is the sort of thing that make git crazy when you are trying to pull from a repository modified that way. This is why your git backup should be considered unstable and why you have to always use a mirror or a force option with <code>git push</code>.</p>
<h2>Merging work and sending it to Subversion</h2>
<p>Let&#8217;s say your are happy with what you did, now you would like to send all that stuff to Subversion. Normally, your branch should be filled with small commits with message mainly consisting of &laquo;&nbsp;Ooops&nbsp;&raquo;, &laquo;&nbsp;Added part foo&nbsp;&raquo;  or &laquo;&nbsp;Debugging&nbsp;&raquo; which you definitely don&#8217;t want to see in the Subversion commit.</p>
<p>That&#8217;s why we are going to do a clean summary of the change you made, update the ChangeLogs accordingly and then use a pretty automagically generated log message for the Subversion commit.</p>
<p>First of all, switch back to master branch. Then issue the following command :</p>
<blockquote>
<pre>git merge --squash feature-xyz</pre>
</blockquote>
<p>What this do is that it takes the most recent version of the branch tree, generate a diff and then apply it to your master tree without committing. If you check with git status, you will see that these change are notified as &laquo;&nbsp;Going to be committed&nbsp;&raquo;.</p>
<p>That&#8217;s when we use our first tool : <a href="http://neteril.org/~jeremie/clng.py">clng.py</a>.</p>
<p>I suggest making an alias to it or putting it in a <em>PATH</em> directory to be able to invoke it directly from the command line.</p>
<p>As you can notice, the script expects some environment variable to be set. <em>EDITOR</em> tells which editor you want to use to edit ChangeLog (e.g. emacs), <em>CHANGE_LOG_NAME</em> contains the name that should be used in the ChangeLog (e.g. John Doe) and, finally, <em>CHANGE_LOG_EMAIL_ADDRESS</em> contains an email address that will be put in the ChangeLog next to your name (e.g. john.doe@foobar.com).</p>
<p>When you have set up those environment variable properly, then from the root of the repository (i.e. where the .git directory is), just call the script with no parameter which will prompt you to edit the ChangeLog corresponding to the files you have changed. That time, use a meaningful entry.</p>
<p>When all ChangeLog have been edited, you still have the option to fine tune them (if you made a typo for instance). When you are finished, call the following command to validate the ChangeLogs :</p>
<blockquote>
<pre>git add -u</pre>
</blockquote>
<p>Here now comes the second script, <a href="http://neteril.org/~jeremie/clm.py">clm.py</a>, that will gather and pretty print what you added to each ChangeLog. It uses the same environment variables than previously. </p>
<p>Then, simply type <code>git commit</code> and copy&amp;paste the commit message given by the script.</p>
<p>The two last steps are, first, to run again <code>git svn rebase</code> to make sure that no change got in between while we were doing the merge and, finally, launch the dcommit command to issue your commit to Subversion :</p>
<blockquote>
<pre>git svn dcommit</pre>
</blockquote>
<h2>Damn, I stumbled upon a bug</h2>
<p>It&#8217;s quite usual that during development time, you will notice several bugs in the code that is already on Subversion. Of course you would like to commit the fix right away because it&#8217;s an easy enough one. Only problem is that you are, most of time, stuck in the middle of something else with several changes in your working tree that haven&#8217;t been committed yet !</p>
<p>Enter <code>git stash</code>. This command will create a temporary branch were all your current changes are committed and then clean your working tree. That way you can painlessly switch back to your bug fixing branch, make some commits to solve the problem, and then push the fix to trunk with the same procedure as described above.</p>
<p>Now, it would be nice if what you were doing before take advantage of that fix (maybe it&#8217;s even a prerequisite). Good news is that you can use the same trick as in the sync section with <code>git rebase</code> to make your branch starts from the commit you just created.</p>
<h2>Working with a Subversion branch</h2>
<p>When you commit a fix, you probably want it to also live in the current stable branch of your software (Mono in our case). That require two things. First, you have to tell git-svn where the branch live and, second, you have to backport the fix.</p>
<p>Normally when you clone the repository in the guide above, you also get all the remote branches with it. If that&#8217;s the case then all is good and you can work from that point. If you don&#8217;t have the remote branch you are interested in, two options. Either you use <code>git fetch</code> to retrieve all the missing symbols (can take a good deal of time) or you directly put in the config the path of the branch you are interested in. Here is for instance the section to setup your Mono 2.6 branch :</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 1735px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[svn-remote "mono-2.6"]</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 1735px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">url = svn+ssh://jlaval@mono-cvs.ximian.com/source</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 1735px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">
<p>fetch = branches/mono-2-6/mcs:refs/remotes/git-svn/mono-2-6</p></div>
<blockquote>
<pre>[svn-remote "mono-2.6"]
  url = svn+ssh://foo@mono-cvs.ximian.com/source
  fetch = branches/mono-2-6/mcs:refs/remotes/git-svn/mono-2-6

[branch "mono-2.6"]
  remote = .
  merge = refs/remotes/git-svn/mono-2-6</pre>
</blockquote>
<p>The only step remaining is to duplicate the change you made to trunk to this maintenance branch which can be easily achieved with the <code>git cherry-pick</code> command. After the (eventual) conflicts are resolved, just issue <code>git svn dcommit</code> to validate this change.</p>
<h2>Merging branch of branch</h2>
<p>Sometimes, it happens that you are developing two things at the same time and that one of it is based on the second which translate by the fact that one of the branch depends on the other branch.</p>
<p>In that case, you are certainly going to end up committing the first branch first, continue a bit polishing the second one and ultimately commit it too. Problem is that, when the first branch get committed, the second one should in turn follows trunk/master happening.</p>
<p>Fortunately, <code>git rebase</code> comes again to the rescue with the onto switch. Simply merge and commit the first branch as described in the section above and then, from the second development branch, issue :</p>
<blockquote>
<pre>git rebase --onto master</pre>
</blockquote>
<p>It will move your second branch to depend on master which should happen flawlessly since the first changes are now mainline.</p>
<h2>Conclusion</h2>
<p>This post is of course far from exhaustive and if you have any more tip, share it in the comments.</p>
]]></description>
			<content:encoded><![CDATA[<p align="center"><img class="size-medium wp-image-807 " title="469147755_bfa4e757de_b" src="http://blog.neteril.org/wp-content/uploads/2010/03/469147755_bfa4e757de_b.jpg" alt="CC by-nd by W. T. L." width="450" height="300" /><br /><span style="text-align: center">CC by-nd by <a href="http://www.flickr.com/people/wtlphotos/">W. T. L.</a></span></p>
<p>I won&#8217;t go here in depth on how to use git, the official hub has already <a href="http://git-scm.com/documentation">tutorials</a> to get you started. I&#8217;m more interested here in the workflow you can apply and the tools you can use when working on Mono with git-svn (although it can be mostly used in a general way too).</p>
<p>Note: this post is heavily based on the <a href="http://www.mono-project.com/Accessibility:_GitSVN:_Workflow">materials</a> written by the accessibility team.</p>
<p>Note²: Prior of everything, your should first read <a href="http://mono-project.com/GitSVN">this guide</a> which explains how to setup your git-svn local copy using an existing git mirror. At this point, I expect that you have successfully completed that step.</p>
<h2>Mirroring your work</h2>
<p>The workflow I will describe here is rather destructive as you are going to end up merging some bits of git history when sending your commit to Subversion. As such, I strongly advise that you have another git mirror of your work somewhere to act as a backup with all your history.</p>
<p>You could either go public with your own <a href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way">server</a>/<a href="http://repo.or.cz/">repo.or.cz</a>/<a href="http://github.com/">github</a>/<a href="http://gitorious.org/">gitorious</a>/whatever or simply use a local copy situated e.g. on another drive.</p>
<p>In any case, this repository is not really meant for public consumption (i.e. people directly working on your git tree) as it&#8217;s going to be quite unstable with frequent history breaks.</p>
<p>When you are decided on where you want to host your mirror, add a remote to its location with the <code>git remote</code> command :</p>
<blockquote>
<pre>git remote add name foo@yourdomain.org:mcs.git</pre>
</blockquote>
<p>When you want to update your remote copy, just issue git push with the remote name and mirror option :</p>
<blockquote>
<pre>git push --mirror name</pre>
</blockquote>
<h2>Synchronizing with trunk</h2>
<p>The first thing to know is actually how to pull Subversion revisions back into your local repository. As with any command that have to deal with Subversion, the common prefix to use is <code>git svn</code>. This action must be done on the master branch so if you are on another one, switch back to master before doing anything else with <code>git checkout</code>.</p>
<p>Here, the command we are interested in is <code>git svn rebase</code>. This command will actually fetch the revisions from trunk, convert them to git commits and replay your local changes (if any) on top of them :</p>
<blockquote>
<pre>git svn rebase</pre>
</blockquote>
<h2>Making changes</h2>
<p>The equivalent of trunk in git is the master branch. This branch should remain clean of any change and should only be used when you are ready to commit your work to Subversion.</p>
<p>In git, branches are everywhere and are the most straightforward way to organize your changes hierarchically. As such, anything you plan to do should be separated in its own branch with a name like feature-xyz. You can also have feature branch that depends on another feature branch, I will talk about these one later and especially how to merge them back.</p>
<p>The command :</p>
<blockquote>
<pre>git checkout -b feature-xyz</pre>
</blockquote>
<p>Will switch you to a new branch where you can happily do your stuff.</p>
<p>What works well here is to follow the scheme : code a piece → commit → test → fix → commit. It will especially helps when you have to crawl back through your history at a later point with, for instance,<code> git bissect</code>.</p>
<p>Notice that commit message style at this point don&#8217;t matter, use the style that suit you the best because you are the only one who will read them.</p>
<p>During the lifetime of your development branch, it&#8217;s likely that some change introduced in Subversion will conflict with what you have done. As such, it&#8217;s always a good idea to frequently sync your local copy with Subversion (see above) and then rebase your development branches on top of master.</p>
<p>The <code>git rebase</code> command exactly serves that purpose and allows to rewrite partially or totally the history of a branch. In practise, this is as simple as issuing from the development branch :</p>
<blockquote>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;">git rebase master</pre>
</blockquote>
<p>As you see, git rebase is powerful tool but it&#8217;s also a destructive one in the sense that it rewrite your history. Rewriting history is the sort of thing that make git crazy when you are trying to pull from a repository modified that way. This is why your git backup should be considered unstable and why you have to always use a mirror or a force option with <code>git push</code>.</p>
<h2>Merging work and sending it to Subversion</h2>
<p>Let&#8217;s say your are happy with what you did, now you would like to send all that stuff to Subversion. Normally, your branch should be filled with small commits with message mainly consisting of &laquo;&nbsp;Ooops&nbsp;&raquo;, &laquo;&nbsp;Added part foo&nbsp;&raquo;  or &laquo;&nbsp;Debugging&nbsp;&raquo; which you definitely don&#8217;t want to see in the Subversion commit.</p>
<p>That&#8217;s why we are going to do a clean summary of the change you made, update the ChangeLogs accordingly and then use a pretty automagically generated log message for the Subversion commit.</p>
<p>First of all, switch back to master branch. Then issue the following command :</p>
<blockquote>
<pre>git merge --squash feature-xyz</pre>
</blockquote>
<p>What this do is that it takes the most recent version of the branch tree, generate a diff and then apply it to your master tree without committing. If you check with git status, you will see that these change are notified as &laquo;&nbsp;Going to be committed&nbsp;&raquo;.</p>
<p>That&#8217;s when we use our first tool : <a href="http://neteril.org/~jeremie/clng.py">clng.py</a>.</p>
<p>I suggest making an alias to it or putting it in a <em>PATH</em> directory to be able to invoke it directly from the command line.</p>
<p>As you can notice, the script expects some environment variable to be set. <em>EDITOR</em> tells which editor you want to use to edit ChangeLog (e.g. emacs), <em>CHANGE_LOG_NAME</em> contains the name that should be used in the ChangeLog (e.g. John Doe) and, finally, <em>CHANGE_LOG_EMAIL_ADDRESS</em> contains an email address that will be put in the ChangeLog next to your name (e.g. john.doe@foobar.com).</p>
<p>When you have set up those environment variable properly, then from the root of the repository (i.e. where the .git directory is), just call the script with no parameter which will prompt you to edit the ChangeLog corresponding to the files you have changed. That time, use a meaningful entry.</p>
<p>When all ChangeLog have been edited, you still have the option to fine tune them (if you made a typo for instance). When you are finished, call the following command to validate the ChangeLogs :</p>
<blockquote>
<pre>git add -u</pre>
</blockquote>
<p>Here now comes the second script, <a href="http://neteril.org/~jeremie/clm.py">clm.py</a>, that will gather and pretty print what you added to each ChangeLog. It uses the same environment variables than previously. </p>
<p>Then, simply type <code>git commit</code> and copy&amp;paste the commit message given by the script.</p>
<p>The two last steps are, first, to run again <code>git svn rebase</code> to make sure that no change got in between while we were doing the merge and, finally, launch the dcommit command to issue your commit to Subversion :</p>
<blockquote>
<pre>git svn dcommit</pre>
</blockquote>
<h2>Damn, I stumbled upon a bug</h2>
<p>It&#8217;s quite usual that during development time, you will notice several bugs in the code that is already on Subversion. Of course you would like to commit the fix right away because it&#8217;s an easy enough one. Only problem is that you are, most of time, stuck in the middle of something else with several changes in your working tree that haven&#8217;t been committed yet !</p>
<p>Enter <code>git stash</code>. This command will create a temporary branch were all your current changes are committed and then clean your working tree. That way you can painlessly switch back to your bug fixing branch, make some commits to solve the problem, and then push the fix to trunk with the same procedure as described above.</p>
<p>Now, it would be nice if what you were doing before take advantage of that fix (maybe it&#8217;s even a prerequisite). Good news is that you can use the same trick as in the sync section with <code>git rebase</code> to make your branch starts from the commit you just created.</p>
<h2>Working with a Subversion branch</h2>
<p>When you commit a fix, you probably want it to also live in the current stable branch of your software (Mono in our case). That require two things. First, you have to tell git-svn where the branch live and, second, you have to backport the fix.</p>
<p>Normally when you clone the repository in the guide above, you also get all the remote branches with it. If that&#8217;s the case then all is good and you can work from that point. If you don&#8217;t have the remote branch you are interested in, two options. Either you use <code>git fetch</code> to retrieve all the missing symbols (can take a good deal of time) or you directly put in the config the path of the branch you are interested in. Here is for instance the section to setup your Mono 2.6 branch :</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 1735px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">[svn-remote "mono-2.6"]</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 1735px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">url = svn+ssh://jlaval@mono-cvs.ximian.com/source</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 1735px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">
<p>fetch = branches/mono-2-6/mcs:refs/remotes/git-svn/mono-2-6</p></div>
<blockquote>
<pre>[svn-remote "mono-2.6"]
  url = svn+ssh://foo@mono-cvs.ximian.com/source
  fetch = branches/mono-2-6/mcs:refs/remotes/git-svn/mono-2-6

[branch "mono-2.6"]
  remote = .
  merge = refs/remotes/git-svn/mono-2-6</pre>
</blockquote>
<p>The only step remaining is to duplicate the change you made to trunk to this maintenance branch which can be easily achieved with the <code>git cherry-pick</code> command. After the (eventual) conflicts are resolved, just issue <code>git svn dcommit</code> to validate this change.</p>
<h2>Merging branch of branch</h2>
<p>Sometimes, it happens that you are developing two things at the same time and that one of it is based on the second which translate by the fact that one of the branch depends on the other branch.</p>
<p>In that case, you are certainly going to end up committing the first branch first, continue a bit polishing the second one and ultimately commit it too. Problem is that, when the first branch get committed, the second one should in turn follows trunk/master happening.</p>
<p>Fortunately, <code>git rebase</code> comes again to the rescue with the onto switch. Simply merge and commit the first branch as described in the section above and then, from the second development branch, issue :</p>
<blockquote>
<pre>git rebase --onto master</pre>
</blockquote>
<p>It will move your second branch to depend on master which should happen flawlessly since the first changes are now mainline.</p>
<h2>Conclusion</h2>
<p>This post is of course far from exhaustive and if you have any more tip, share it in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2010/03/02/working-on-mono-with-git-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A FOSDEM talk primer</title>
		<link>http://blog.neteril.org/2010/01/21/a-fosdem-talk-primer/</link>
		<comments>http://blog.neteril.org/2010/01/21/a-fosdem-talk-primer/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 18:18:04 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Google Summer of Code 2009]]></category>
		<category><![CDATA[Mono]]></category>

		<guid isPermaLink="false">http://blog.neteril.org/?p=776</guid>
		<description><![CDATA[<p>(Shamelessly inspired from <a href="http://blog.reblochon.org/">Stéphane</a>)</p>
<p>Since image processing is both trendy and a good candidate for parallel optimizations, I took the time to implement a little program that compute a part of the <a href="http://en.wikipedia.org/wiki/Mandelbrot_set">Mandelbrot set</a> (a well known fractal) in a fancy way :</p>
<p style="text-align: center; margin: 1em;"><img class="aligncenter size-medium wp-image-777" title="Lolipop" src="http://blog.neteril.org/wp-content/uploads/2010/01/lolipop-300x300.png" alt="Lolipop" width="300" height="300" /></p>
<p>Now for the facts &amp; numbers :</p>
<blockquote><p>
Sequential generation : <strong>26.5s</strong><br />
Parallel generation : <strong>13.7s</strong><br />
Effective speedup : <strong>2 times faster</strong> (dual core computer)<br />
# changes between sequential and parallel : <strong>3 lines</strong></p></blockquote>
<p>Oh, and this was done using the ParallelFx bundled with Mono 2.6 that you can already use today in your applications.</p>
<p>More informations and tips on Sunday 7th @ FOSDEM in Mono room. Don&#8217;t miss it !</p>
<p>PS: Also, don&#8217;t forget <a href="http://hackerspace.be/Mono_hack-a-day">Mono Hackaday</a> on Monday February 8th.</p>
]]></description>
			<content:encoded><![CDATA[<p>(Shamelessly inspired from <a href="http://blog.reblochon.org/">Stéphane</a>)</p>
<p>Since image processing is both trendy and a good candidate for parallel optimizations, I took the time to implement a little program that compute a part of the <a href="http://en.wikipedia.org/wiki/Mandelbrot_set">Mandelbrot set</a> (a well known fractal) in a fancy way :</p>
<p style="text-align: center; margin: 1em;"><img class="aligncenter size-medium wp-image-777" title="Lolipop" src="http://blog.neteril.org/wp-content/uploads/2010/01/lolipop-300x300.png" alt="Lolipop" width="300" height="300" /></p>
<p>Now for the facts &amp; numbers :</p>
<blockquote><p>
Sequential generation : <strong>26.5s</strong><br />
Parallel generation : <strong>13.7s</strong><br />
Effective speedup : <strong>2 times faster</strong> (dual core computer)<br />
# changes between sequential and parallel : <strong>3 lines</strong></p></blockquote>
<p>Oh, and this was done using the ParallelFx bundled with Mono 2.6 that you can already use today in your applications.</p>
<p>More informations and tips on Sunday 7th @ FOSDEM in Mono room. Don&#8217;t miss it !</p>
<p>PS: Also, don&#8217;t forget <a href="http://hackerspace.be/Mono_hack-a-day">Mono Hackaday</a> on Monday February 8th.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2010/01/21/a-fosdem-talk-primer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mono happening @ FOSDEM</title>
		<link>http://blog.neteril.org/2009/12/11/mono-happening-fosdem/</link>
		<comments>http://blog.neteril.org/2009/12/11/mono-happening-fosdem/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 12:08:52 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.neteril.org/?p=744</guid>
		<description><![CDATA[<h2>Mono room</h2>
<p><img src="http://blog.neteril.org/wp-content/uploads/2009/12/fosdem_brain.png" alt="fosdem_brain" title="fosdem_brain" width="318" height="252" class="aligncenter size-full wp-image-768" /></p>
<p>So if you weren&#8217;t aware of it yet, Mono is going to have <a href="http://weblog.savanne.be/186-fosdem-2010-mono-developer-room-cfp">its own dedicated room</a> at <acronym title="Free and Open Source Software Developers' European Meeting">FOSDEM</acronym>. In order to spread Mono awesomeness, submit talks <a href="http://tinyurl.com/fosdem-2010-mono">here</a> before the 20th. You can even decide yourself how much time you are going to use so don&#8217;t hesitate to speak about a cool software you are working on, a nice hack you have done or a how-to on a library for instance.</p>
<h2>Mono Hackaday</h2>
<p><img src="http://blog.neteril.org/wp-content/uploads/2009/12/banner.png" alt="banner" title="banner" width="256" height="256" class="aligncenter size-full wp-image-754" /></p>
<p>As a side event, there will also be a Mono Hackaday the day after FOSDEM, i.e. Monday 8th, at <a href="http://hackerspace.be/">Hacker Space Brussels (HSB)</a> with all the vital hacker facilities (location details <a href="http://hackerspace.be/Location">here</a>). Everyone is welcome to drop by from 10am to 19pm. There is no precise goal for the hackaday, it&#8217;s just enjoying your normal and random hacking with other Mono fellows.</p>
<h2>Conclusion</h2>
<p>Anyway, in all case :</p>
<p align="center"><a href="http://www.fosdem.org"><img src="http://blog.neteril.org/wp-content/uploads/2009/12/going-to.jpg" alt="FOSDEM, the Free and Open Source Software Developers&#039; European Meeting" title="going-to" width="150" height="89" class="size-full wp-image-746" /></a></p>
<p>See you there (and bring your Rupert too) !</p>
]]></description>
			<content:encoded><![CDATA[<h2>Mono room</h2>
<p><img src="http://blog.neteril.org/wp-content/uploads/2009/12/fosdem_brain.png" alt="fosdem_brain" title="fosdem_brain" width="318" height="252" class="aligncenter size-full wp-image-768" /></p>
<p>So if you weren&#8217;t aware of it yet, Mono is going to have <a href="http://weblog.savanne.be/186-fosdem-2010-mono-developer-room-cfp">its own dedicated room</a> at <acronym title="Free and Open Source Software Developers' European Meeting">FOSDEM</acronym>. In order to spread Mono awesomeness, submit talks <a href="http://tinyurl.com/fosdem-2010-mono">here</a> before the 20th. You can even decide yourself how much time you are going to use so don&#8217;t hesitate to speak about a cool software you are working on, a nice hack you have done or a how-to on a library for instance.</p>
<h2>Mono Hackaday</h2>
<p><img src="http://blog.neteril.org/wp-content/uploads/2009/12/banner.png" alt="banner" title="banner" width="256" height="256" class="aligncenter size-full wp-image-754" /></p>
<p>As a side event, there will also be a Mono Hackaday the day after FOSDEM, i.e. Monday 8th, at <a href="http://hackerspace.be/">Hacker Space Brussels (HSB)</a> with all the vital hacker facilities (location details <a href="http://hackerspace.be/Location">here</a>). Everyone is welcome to drop by from 10am to 19pm. There is no precise goal for the hackaday, it&#8217;s just enjoying your normal and random hacking with other Mono fellows.</p>
<h2>Conclusion</h2>
<p>Anyway, in all case :</p>
<p align="center"><a href="http://www.fosdem.org"><img src="http://blog.neteril.org/wp-content/uploads/2009/12/going-to.jpg" alt="FOSDEM, the Free and Open Source Software Developers&#039; European Meeting" title="going-to" width="150" height="89" class="size-full wp-image-746" /></a></p>
<p>See you there (and bring your Rupert too) !</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2009/12/11/mono-happening-fosdem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WiFi power saving &amp; kernel 2.6.31</title>
		<link>http://blog.neteril.org/2009/10/28/wifi-power-saving-kernel-2-6-31/</link>
		<comments>http://blog.neteril.org/2009/10/28/wifi-power-saving-kernel-2-6-31/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 21:45:15 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.neteril.org/?p=708</guid>
		<description><![CDATA[<p>As of Linux kernel 2.6.31 (currently available on <a href="http://www.archlinux.org/">Arch Linux</a> for instance), due to a change in the iwl* drivers, the sysfs entries that were managing power saving on related WiFi chips was removed due to some power management-related bugs.</p>
<p>As such, it&#8217;s impossible to manually set powersaving either using sysfs or via a command like <code>iwconfig power</code>. </p>
<p>Worst part is that the drivers aren&#8217;t even correctly advertising themselves to mac80211 (the underlying layer of the WiFi stack) as able to handle power saving operations thus preventing any event to be propagated back to the driver. You can find more information about the problem <a href="http://patchwork.kernel.org/patch/45225/">on the following thread</a>.</p>
<p>Of course this sucks quite a bit for people who cares about their battery life and who don&#8217;t want to wait for 2.6.32 kernel. That&#8217;s why we decided to try up <a href="http://linuxwireless.org/en/users/Download">compat-wireless</a>.</p>
<p>Compat-wireless is a set of scripts that allows you to install the freshest drivers from the linux-wireless project (list of driver <a href="http://linuxwireless.org/en/users/Drivers">here</a>) in a safe fashion i.e. without messing up your distribution supplied modules and without need for a kernel recompilation. These new modules are also very easy to uninstall and everything is made to prevent you from nuking too much your system.</p>
<p>Turns out that in recent revision of the drivers (>= 2009-10-28), powersave is back in a sort of automated fashion and blocking powersave operations are now limited to the faulty driver/chipset : iwl4965. So if you either use iwlagn or iwl3945 (<code>lsmod</code> will tell you) chances are good that you will get back your nice powertop output (it did for <a href="http://chrooted-universe.org/">a friend</a> and I).</p>
<p>As for installing the beast, the instructions on the official website <a href="http://linuxwireless.org/en/users/Download#Where_to_download_bleeding_edge">starting from here</a> are simple and straightforward. </p>
<p>Of course, if you were using iwl4965 your are still left out. However, if power saving weren&#8217;t breaking up your driver on earlier kernel version, you can simply comment out the <code>.broken_powersave = true</code> configuration statement in iwl-4965.c (line 2282 or so) under <code>drivers/net/wireless/iwlwifi/</code>.</p>
]]></description>
			<content:encoded><![CDATA[<p>As of Linux kernel 2.6.31 (currently available on <a href="http://www.archlinux.org/">Arch Linux</a> for instance), due to a change in the iwl* drivers, the sysfs entries that were managing power saving on related WiFi chips was removed due to some power management-related bugs.</p>
<p>As such, it&#8217;s impossible to manually set powersaving either using sysfs or via a command like <code>iwconfig power</code>. </p>
<p>Worst part is that the drivers aren&#8217;t even correctly advertising themselves to mac80211 (the underlying layer of the WiFi stack) as able to handle power saving operations thus preventing any event to be propagated back to the driver. You can find more information about the problem <a href="http://patchwork.kernel.org/patch/45225/">on the following thread</a>.</p>
<p>Of course this sucks quite a bit for people who cares about their battery life and who don&#8217;t want to wait for 2.6.32 kernel. That&#8217;s why we decided to try up <a href="http://linuxwireless.org/en/users/Download">compat-wireless</a>.</p>
<p>Compat-wireless is a set of scripts that allows you to install the freshest drivers from the linux-wireless project (list of driver <a href="http://linuxwireless.org/en/users/Drivers">here</a>) in a safe fashion i.e. without messing up your distribution supplied modules and without need for a kernel recompilation. These new modules are also very easy to uninstall and everything is made to prevent you from nuking too much your system.</p>
<p>Turns out that in recent revision of the drivers (>= 2009-10-28), powersave is back in a sort of automated fashion and blocking powersave operations are now limited to the faulty driver/chipset : iwl4965. So if you either use iwlagn or iwl3945 (<code>lsmod</code> will tell you) chances are good that you will get back your nice powertop output (it did for <a href="http://chrooted-universe.org/">a friend</a> and I).</p>
<p>As for installing the beast, the instructions on the official website <a href="http://linuxwireless.org/en/users/Download#Where_to_download_bleeding_edge">starting from here</a> are simple and straightforward. </p>
<p>Of course, if you were using iwl4965 your are still left out. However, if power saving weren&#8217;t breaking up your driver on earlier kernel version, you can simply comment out the <code>.broken_powersave = true</code> configuration statement in iwl-4965.c (line 2282 or so) under <code>drivers/net/wireless/iwlwifi/</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2009/10/28/wifi-power-saving-kernel-2-6-31/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Wicd support patch for Banshee</title>
		<link>http://blog.neteril.org/2009/10/06/wicd-support-patch-for-banshee/</link>
		<comments>http://blog.neteril.org/2009/10/06/wicd-support-patch-for-banshee/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 21:25:38 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.neteril.org/?p=700</guid>
		<description><![CDATA[<p>Shameless plug to tell I&#8217;m alive <img src='http://blog.neteril.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  .</p>
<p>If you are using <a href="http://wicd.sourceforge.net/">Wicd</a> and usually stare at Banshee trying to download cover art or post to last.fm while you are disconnected, <a href="http://neteril.org/mono/wicd-support.patch">the following patch</a> add just the support to fix this.</p>
<p>Here is the associated <a href="https://bugzilla.gnome.org/show_bug.cgi?id=596918">bug report</a> to get the patch integrated.</p>
<p>In other news, school restarted with its bunch of new responsibilities, limiting significantly free hacking time.</p>
]]></description>
			<content:encoded><![CDATA[<p>Shameless plug to tell I&#8217;m alive <img src='http://blog.neteril.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  .</p>
<p>If you are using <a href="http://wicd.sourceforge.net/">Wicd</a> and usually stare at Banshee trying to download cover art or post to last.fm while you are disconnected, <a href="http://neteril.org/mono/wicd-support.patch">the following patch</a> add just the support to fix this.</p>
<p>Here is the associated <a href="https://bugzilla.gnome.org/show_bug.cgi?id=596918">bug report</a> to get the patch integrated.</p>
<p>In other news, school restarted with its bunch of new responsibilities, limiting significantly free hacking time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2009/10/06/wicd-support-patch-for-banshee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get the max out of your PLinq query</title>
		<link>http://blog.neteril.org/2009/08/16/how-to-get-the-max-out-of-your-plinq-query/</link>
		<comments>http://blog.neteril.org/2009/08/16/how-to-get-the-max-out-of-your-plinq-query/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 17:34:15 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Google Summer of Code 2009]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.neteril.org/?p=685</guid>
		<description><![CDATA[<p>Here are some tips you should follow if you want to get the maximum performance out of a Linq query parallelized with PLinq (at least with upcoming Mono version) :</p>
<ul>
<li>
<p>Use an indexed data structure as your source like an array, a list or anything which implements the generic IList&lt;T&gt; interface.</p>
<p>You can also use <a href="http://msdn.microsoft.com/en-us/library/dd268181%28VS.100%29.aspx">ParallelEnumerable.Repeat</a> and <a href="http://msdn.microsoft.com/en-us/library/system.linq.parallelenumerable.range%28VS.100%29.aspx">ParallelEnumerable.Range</a> as input. Notice the &#8216;Parallel&#8217; word in front as it&#8217;s not the same as Enumerable.(Range|Repeat)</p>
</li>
<li>
<p>Never use an ordering operator like OrderBy and never assume that the query should be ordered.</p>
<p>The overloads of some operator that provide an index integer are also to avoid.</p>
</li>
<li>
<p>As a general rule, try to stick to the general scheme of <a href="http://msdn.microsoft.com/en-us/library/dd383966%28VS.100%29.aspx">Select</a>-<a href="http://msdn.microsoft.com/en-us/library/dd384150%28VS.100%29.aspx">Where</a>-<a href="http://msdn.microsoft.com/en-us/library/dd383667%28VS.100%29.aspx">Aggregate</a> with any number of Select and Where (like the famous <a href="http://en.wikipedia.org/wiki/MapReduce">MapReduce</a>).</p>
<p>The syntactic sugar operators based on Aggregate like Min, Max, Average, etc&#8230; can also be used.</p>
</li>
<li>
<p>If you can manage it in your code, use the <a href="http://msdn.microsoft.com/en-us/library/dd383744%28VS.100%29.aspx">ForAll</a> method with an action delegate instead of iterating over the query with <code>foreach</code></p>
</li>
<li>
<p>Of course, forbid any synchronization (locks, semaphore, &#8230;) inside the operator selectors/predicates. The purest your lambdas are, the better.</p>
</li>
<li>
<p>The functions used with operators should be predictive and stable i.e. not depend on something uncertain time-wise like a network call and should yield approximately the same execution time with each input.</p>
<p>Sure, this is not always possible but if it is, it does prevent the engine from having to repeatedly balance the query execution itself.</p>
</li>
</ul>
<p>The <a href="http://msdn.microsoft.com/en-us/library/dd460688%28VS.100%29.aspx">PLinq MSDN page</a> contains some additional tricks and explanations if you are interested.</p>
]]></description>
			<content:encoded><![CDATA[<p>Here are some tips you should follow if you want to get the maximum performance out of a Linq query parallelized with PLinq (at least with upcoming Mono version) :</p>
<ul>
<li>
<p>Use an indexed data structure as your source like an array, a list or anything which implements the generic IList&lt;T&gt; interface.</p>
<p>You can also use <a href="http://msdn.microsoft.com/en-us/library/dd268181%28VS.100%29.aspx">ParallelEnumerable.Repeat</a> and <a href="http://msdn.microsoft.com/en-us/library/system.linq.parallelenumerable.range%28VS.100%29.aspx">ParallelEnumerable.Range</a> as input. Notice the &#8216;Parallel&#8217; word in front as it&#8217;s not the same as Enumerable.(Range|Repeat)</p>
</li>
<li>
<p>Never use an ordering operator like OrderBy and never assume that the query should be ordered.</p>
<p>The overloads of some operator that provide an index integer are also to avoid.</p>
</li>
<li>
<p>As a general rule, try to stick to the general scheme of <a href="http://msdn.microsoft.com/en-us/library/dd383966%28VS.100%29.aspx">Select</a>-<a href="http://msdn.microsoft.com/en-us/library/dd384150%28VS.100%29.aspx">Where</a>-<a href="http://msdn.microsoft.com/en-us/library/dd383667%28VS.100%29.aspx">Aggregate</a> with any number of Select and Where (like the famous <a href="http://en.wikipedia.org/wiki/MapReduce">MapReduce</a>).</p>
<p>The syntactic sugar operators based on Aggregate like Min, Max, Average, etc&#8230; can also be used.</p>
</li>
<li>
<p>If you can manage it in your code, use the <a href="http://msdn.microsoft.com/en-us/library/dd383744%28VS.100%29.aspx">ForAll</a> method with an action delegate instead of iterating over the query with <code>foreach</code></p>
</li>
<li>
<p>Of course, forbid any synchronization (locks, semaphore, &#8230;) inside the operator selectors/predicates. The purest your lambdas are, the better.</p>
</li>
<li>
<p>The functions used with operators should be predictive and stable i.e. not depend on something uncertain time-wise like a network call and should yield approximately the same execution time with each input.</p>
<p>Sure, this is not always possible but if it is, it does prevent the engine from having to repeatedly balance the query execution itself.</p>
</li>
</ul>
<p>The <a href="http://msdn.microsoft.com/en-us/library/dd460688%28VS.100%29.aspx">PLinq MSDN page</a> contains some additional tricks and explanations if you are interested.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2009/08/16/how-to-get-the-max-out-of-your-plinq-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#171;&#160;Fundamentalist Functional Programming&#160;&#187;</title>
		<link>http://blog.neteril.org/2009/08/15/fundamentalist-functional-programming/</link>
		<comments>http://blog.neteril.org/2009/08/15/fundamentalist-functional-programming/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 19:46:15 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.neteril.org/?p=678</guid>
		<description><![CDATA[<p><a href="http://research.microsoft.com/en-us/um/people/emeijer/">Erik Meijer</a>, guru at MS Research, has recently given a talk at OSCON 2009 introducing functional programming in a funny way. Highly recommended if you have always wondered what all fuss about side effects and purity is about.</p>
<p><embed src="http://blip.tv/play/AYGT6zkC" type="application/x-shockwave-flash" width="480" height="300" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<p>Check it out : <a href="http://blip.tv/file/2402061/">http://blip.tv/file/2402061/</a></p>
<p>He even cite Mono around 4:30 (btw Erik, Mono has supported C# 3.0 for quite a long time now <img src='http://blog.neteril.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ).</p>
<p>To conclude, &laquo;&nbsp;Go purify yourself because you are all sinners&nbsp;&raquo; <img src='http://blog.neteril.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  .</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://research.microsoft.com/en-us/um/people/emeijer/">Erik Meijer</a>, guru at MS Research, has recently given a talk at OSCON 2009 introducing functional programming in a funny way. Highly recommended if you have always wondered what all fuss about side effects and purity is about.</p>
<p><embed src="http://blip.tv/play/AYGT6zkC" type="application/x-shockwave-flash" width="480" height="300" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<p>Check it out : <a href="http://blip.tv/file/2402061/">http://blip.tv/file/2402061/</a></p>
<p>He even cite Mono around 4:30 (btw Erik, Mono has supported C# 3.0 for quite a long time now <img src='http://blog.neteril.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ).</p>
<p>To conclude, &laquo;&nbsp;Go purify yourself because you are all sinners&nbsp;&raquo; <img src='http://blog.neteril.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2009/08/15/fundamentalist-functional-programming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Follow-up on OpenVG support for Moonligh</title>
		<link>http://blog.neteril.org/2009/07/27/follow-up-on-openvg-support-for-moonlight/</link>
		<comments>http://blog.neteril.org/2009/07/27/follow-up-on-openvg-support-for-moonlight/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 18:12:52 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://garuma.wordpress.com/?p=666</guid>
		<description><![CDATA[<p>Interested by the stuff I <a href="http://garuma.wordpress.com/2009/07/16/joining-the-moonlight-fun/">demonstrated</a> some weeks ago ?</p>
<p>Check out the following <a href="http://lists.ximian.com/pipermail/moonlight-list/2009-July/000561.html">message</a> on Moonlight mailing-list for instructions on how to get the same thing.</p>
<p>Just to make you salivate :</p>
<p align="center"><!-- Smart Youtube --><span class="youtube"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/Ekfb6jCyDmM&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/Ekfb6jCyDmM&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" ></embed><param name="wmode" value="transparent" /></object></span><br />
<br /><em>BubbleMark running at ~50 fps without too much visual glitches</em><br />
(direct link : <a href="http://www.youtube.com/watch?v=Ekfb6jCyDmM">http://www.youtube.com/watch?v=Ekfb6jCyDmM</a>)</p>
]]></description>
			<content:encoded><![CDATA[<p>Interested by the stuff I <a href="http://garuma.wordpress.com/2009/07/16/joining-the-moonlight-fun/">demonstrated</a> some weeks ago ?</p>
<p>Check out the following <a href="http://lists.ximian.com/pipermail/moonlight-list/2009-July/000561.html">message</a> on Moonlight mailing-list for instructions on how to get the same thing.</p>
<p>Just to make you salivate :</p>
<p align="center"><!-- Smart Youtube --><span class="youtube"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/Ekfb6jCyDmM&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/Ekfb6jCyDmM&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" ></embed><param name="wmode" value="transparent" /></object></span><br />
<br /><em>BubbleMark running at ~50 fps without too much visual glitches</em><br />
(direct link : <a href="http://www.youtube.com/watch?v=Ekfb6jCyDmM">http://www.youtube.com/watch?v=Ekfb6jCyDmM</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2009/07/27/follow-up-on-openvg-support-for-moonlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joining the Moonlight fun</title>
		<link>http://blog.neteril.org/2009/07/16/joining-the-moonlight-fun/</link>
		<comments>http://blog.neteril.org/2009/07/16/joining-the-moonlight-fun/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 15:07:17 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://garuma.wordpress.com/?p=660</guid>
		<description><![CDATA[<p>Watching my teammate hacking on moonlight was sure to detain on me someday. So when <a href="http://monotorrent.blogspot.com/">Alan</a> talked about making <a href="http://mono-project.com/Moonlight">Moonlight</a> run on top of <a href="http://en.wikipedia.org/wiki/OpenVG">OpenVG</a> I got pretty hooked.</p>
<p>Two hacking days later, I actually got something to &laquo;&nbsp;work&nbsp;&raquo;. At the moment it&#8217;s quite rough, hacky and it probably kills kitteh too (be careful, it makes shana angry, you wouldn&#8217;t like that).</p>
<p>Basically, what I did is to plug the OpenVG layer inside Moonlight custom version of cairo (using <a href="http://lists.cairographics.org/archives/cairo/2008-January/012833.html">that code</a> as a base) and then tweaked Moonlight to use the new surface (together with some changes in how drawing and caching is done internally).</p>
<p>Following is a screencast of the thing running <a href="http://bubblemark.com/silverlight2.html">Bubble Mark</a> :</p>
<p align="center"><!-- Smart Youtube --><span class="youtube"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/dywInr08ySg&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/dywInr08ySg&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" ></embed><param name="wmode" value="transparent" /></object></span><br />
<br />
(Direct link : <a href="http://www.youtube.com/watch?v=dywInr08ySg">http://www.youtube.com/watch?v=dywInr08ySg</a>)</p>
<p>As you can see there are a lot of drawing issues remaining but the basic stuff is here. The code is not terribly faster (+10 fps or so) but that may come either from a bug in my graphic card driver (it already does the bizarre thing of slowing down after some time) or an other part of Moonlight.</p>
<p>It will definitely be better when OpenVG becomes more widespread, has more optimized implementations and can actually run on its own rather than on top of OpenGL (I&#8217;m eager to try that on top of Gallium3D when it will be ready).</p>
<p>As for inclusion in the mainline tree, I don&#8217;t know. I mostly did the thing for fun as a proof-of-concept and it&#8217;s certainly far too crappy to ever get integrated as is, but maybe someone will step up and do it correctly later <img src='http://blog.neteril.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  .</p>
]]></description>
			<content:encoded><![CDATA[<p>Watching my teammate hacking on moonlight was sure to detain on me someday. So when <a href="http://monotorrent.blogspot.com/">Alan</a> talked about making <a href="http://mono-project.com/Moonlight">Moonlight</a> run on top of <a href="http://en.wikipedia.org/wiki/OpenVG">OpenVG</a> I got pretty hooked.</p>
<p>Two hacking days later, I actually got something to &laquo;&nbsp;work&nbsp;&raquo;. At the moment it&#8217;s quite rough, hacky and it probably kills kitteh too (be careful, it makes shana angry, you wouldn&#8217;t like that).</p>
<p>Basically, what I did is to plug the OpenVG layer inside Moonlight custom version of cairo (using <a href="http://lists.cairographics.org/archives/cairo/2008-January/012833.html">that code</a> as a base) and then tweaked Moonlight to use the new surface (together with some changes in how drawing and caching is done internally).</p>
<p>Following is a screencast of the thing running <a href="http://bubblemark.com/silverlight2.html">Bubble Mark</a> :</p>
<p align="center"><!-- Smart Youtube --><span class="youtube"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/dywInr08ySg&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/dywInr08ySg&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" ></embed><param name="wmode" value="transparent" /></object></span><br />
<br />
(Direct link : <a href="http://www.youtube.com/watch?v=dywInr08ySg">http://www.youtube.com/watch?v=dywInr08ySg</a>)</p>
<p>As you can see there are a lot of drawing issues remaining but the basic stuff is here. The code is not terribly faster (+10 fps or so) but that may come either from a bug in my graphic card driver (it already does the bizarre thing of slowing down after some time) or an other part of Moonlight.</p>
<p>It will definitely be better when OpenVG becomes more widespread, has more optimized implementations and can actually run on its own rather than on top of OpenGL (I&#8217;m eager to try that on top of Gallium3D when it will be ready).</p>
<p>As for inclusion in the mainline tree, I don&#8217;t know. I mostly did the thing for fun as a proof-of-concept and it&#8217;s certainly far too crappy to ever get integrated as is, but maybe someone will step up and do it correctly later <img src='http://blog.neteril.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2009/07/16/joining-the-moonlight-fun/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Obviously,</title>
		<link>http://blog.neteril.org/2009/07/12/obviously/</link>
		<comments>http://blog.neteril.org/2009/07/12/obviously/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 10:00:12 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://garuma.wordpress.com/?p=651</guid>
		<description><![CDATA[<p><img alt="" src="http://desrt.ca/blog-items/on-the-topic-of-mono.png" title="writing-code" class="aligncenter" width="600" height="144" /></p>
<p><cite>Talk is cheap. Show me the code.</cite><br />
&#8212; Torvalds, Linus</p>
]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://desrt.ca/blog-items/on-the-topic-of-mono.png" title="writing-code" class="aligncenter" width="600" height="144" /></p>
<p><cite>Talk is cheap. Show me the code.</cite><br />
&#8212; Torvalds, Linus</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2009/07/12/obviously/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
