<?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] &#187; Mono</title>
	<atom:link href="http://blog.neteril.org/category/mono/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.neteril.org</link>
	<description>Random thoughts of Jérémie Laval</description>
	<lastBuildDate>Wed, 24 Aug 2011 17:43:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>GSoC 2011 &#8211; TPL Dataflow</title>
		<link>http://blog.neteril.org/2011/08/24/gsoc-2011-tpl-dataflow/</link>
		<comments>http://blog.neteril.org/2011/08/24/gsoc-2011-tpl-dataflow/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 11:31:54 +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=1132</guid>
		<description><![CDATA[This summer I have been working again as a Google Summer of Code student for Mono. This time, I re-implemented another parallel-related library called TPL Dataflow. It&#8217;s still a research project at Microsoft and it has recently released a preview version of the framework which is designed to work well with the asynchronous features of [...]]]></description>
			<content:encoded><![CDATA[<p>This summer I have been working again as a <a href="http://code.google.com/soc/">Google Summer of Code</a> student for Mono. This time, I re-implemented another parallel-related library called <a href="http://msdn.microsoft.com/en-us/devlabs/gg585582">TPL Dataflow</a>.</p>
<p>It&#8217;s still a research project at Microsoft and it has recently released a preview version of the framework which is designed to work well with the asynchronous features of the latest .NET CTP.</p>
<p>The goal of the framework is similar to PLinq in the sense that you construct a pipeline composed of blocks expressing individual operation (action, transformation, join, fork, &#8230;) with the notable difference that the model is push-based instead of pull-based.</p>
<p>Push-based basically means that, in the same way than the <a href="http://msdn.microsoft.com/en-us/data/gg577609">Reactive Extensions</a>, you explicitly feed data to your pipeline instead of acquiring it from a source. Then the final data can be received or processed by a block at the other end of the chain.</p>
<p>All of that makes a nice model for asynchronicity that you can use both to send or receive data thanks to a number of extensions method in the framework (suffixed by <code>Async</code>) which returns a <code>Task</code> thus letting you setup continuations or use the new <code>await</code> keyword (also available in Mono master btw).</p>
<p>Under the hood the framework is built upon what ParallelFx provides like the concurrent collections and the task primitive meaning it&#8217;s also taking full advantage of the available parallelism on your machine.</p>
<p>The code is now available directly from Mono master and is built in the <code>System.Threading.Tasks.Dataflow</code> assembly with the 4.0 profile. While not totally complete, it&#8217;s still already usable.</p>
<p>MSDN doesn&#8217;t yet show the documentation so I <a href="http://neteril.org/~jeremie/mono/tpl-dataflow/">uploaded the copy</a> shipped with the preview. </p>
<p>You can also watch Stephen Toub <a href="http://channel9.msdn.com/posts/TPL-Dataflow-Tour">introductory video</a> for a tour of the framework (also embedded below).</p>
<div style="height:288px;width:512px;margin:auto"><iframe style="height:288px;width:512px;margin:auto;" src="http://channel9.msdn.com/posts/TPL-Dataflow-Tour/player?w=512&#038;h=288" frameBorder="0" scrolling="no" ></iframe></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2011/08/24/gsoc-2011-tpl-dataflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Going parallel on mobile devices</title>
		<link>http://blog.neteril.org/2011/07/25/going-parallel-on-mobile-devices/</link>
		<comments>http://blog.neteril.org/2011/07/25/going-parallel-on-mobile-devices/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 22:28:32 +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=1116</guid>
		<description><![CDATA[It took around 20 years for CPU manufacturers to abandon the GHz war on the desktop and start going multicore. In the mobile space and only 3 years after the first Android smartphone, we are already seeing dual-cores phones (with quad-cores around the corner). Recent tablets are on the same boat. The brilliant thing is [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://blog.neteril.org/wp-content/uploads/2011/07/device-2011-07-19-175035.png"><img src="http://blog.neteril.org/wp-content/uploads/2011/07/device-2011-07-19-175035.png" alt="" title="device-2011-07-19-175035" width="240" height="400" class="aligncenter size-full wp-image-1117" /></a></p>
<p>It took around 20 years for CPU manufacturers to abandon the GHz war on the desktop and start going multicore. </p>
<p>In the mobile space and only 3 years after the first Android smartphone, we are already seeing dual-cores phones (with quad-cores around the corner). Recent tablets are on the same boat.</p>
<p>The brilliant thing is that with <a href="http://android.xamarin.com/">Monodroid</a> and <a href="http://ios.xamarin.com/">Monotouch</a>, we have the possibility to harness this new found processing power today using all the existing ParallelFx constructs since they are part of both distributions (i.e. Tasks, continuations, parallel loops, PLinq and friends).</p>
<p>To illustrate that, I ported the now classic raytracer code from the Parallel sample gallery to Android using Monodroid. Code is on <a href="https://github.com/garuma/raydroid">GitHub</a> if you want to give it a spin.</p>
<p>While the application itself is painfully slow since all rendering is in software, it does exhibit the same speed improvement when you ran in parallel mode as with the desktop version on my dual-core smartphone. For iDevices lovers, <a href="http://blog.sublimeintervention.com/">Geoff</a> also had a similar version running on an iPad 2.</p>
<p>If you are at Monospace and want to talk about that stuff (and ParallelFx in general), don&#8217;t hesitate to come and say hi. Anyhow, I&#8217;ll continue to post more examples of how you can use ParallelFx practically in your mobile apps.</p>
<p>PS: as you&#8217;ll see in the source, there are some hacks bundled because of a couple of Mono bugs but they will get fixed eventually.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2011/07/25/going-parallel-on-mobile-devices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Say it with cows</title>
		<link>http://blog.neteril.org/2011/07/08/say-it-with-cows/</link>
		<comments>http://blog.neteril.org/2011/07/08/say-it-with-cows/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 20:29:37 +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=1100</guid>
		<description><![CDATA[_________________________________ < All your moos are belong to us > --------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ &#124;&#124;----w &#124; &#124;&#124; &#124;&#124; Upon my latest Twitter question and getting no further answer, I carried out even more (useful) Manos world domination by writing Moo, an online cowsay generator (code on github under beer license). Cowsay is [...]]]></description>
			<content:encoded><![CDATA[<p>
<pre> _________________________________
< All your moos are belong to us  >
 ---------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
 </pre>
</p>
<p>Upon my latest Twitter <a href="https://twitter.com/#!/jeremie_laval/status/80777723458498560">question</a> and getting no further answer, I carried out even more (useful) <a href="http://manosdemono.com/">Manos</a> world domination by writing <a href="http://moo.neteril.org">Moo</a>, an online cowsay generator (<a href="https://github.com/garuma/moo">code</a> on github under <a href="http://en.wikipedia.org/wiki/Beerware">beer license</a>).</p>
<p><a href="http://en.wikipedia.org/wiki/Cowsay">Cowsay</a> is one of those obscure Perl thing from the dark hacker age that once plagued mails and terminals. </p>
<p>It basically consists of a variety of ASCII animals (not limited to cows actually) telling some text inside bubbles. Useless therefore essential.</p>
<p>All of that offering me the shameless plug of telling the world I&#8217;m attending
<p align="center"><a href="http://blog.neteril.org/wp-content/uploads/2011/07/monospace.png"><img src="http://blog.neteril.org/wp-content/uploads/2011/07/monospace.png" alt="" title="monospace" width="194" height="112" class="alignnone size-full wp-image-1101" /></a></p>
<p>See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2011/07/08/say-it-with-cows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebMatrix.Data on Mono</title>
		<link>http://blog.neteril.org/2011/01/22/webmatrix-data-on-mono/</link>
		<comments>http://blog.neteril.org/2011/01/22/webmatrix-data-on-mono/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 13:28:00 +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=1084</guid>
		<description><![CDATA[Initial reading on what is WebMatrix can be found on Scott Guthrie blog. After team WebMatrix was formed this week, I have reimplemented the Data part of WebMatrix, a cute layer on top of ADO.NET with support for the dynamic keyword (C# 4) so that you can directly call property equivalent to your column names. [...]]]></description>
			<content:encoded><![CDATA[<p>Initial reading on what is WebMatrix can be found on <a href=" http://weblogs.asp.net/scottgu/archive/2011/01/13/announcing-release-of-asp-net-mvc-3-iis-express-sql-ce-4-web-farm-framework-orchard-webmatrix.aspx">Scott Guthrie blog</a>.</p>
<p>After team WebMatrix was formed this week, I have reimplemented the Data part of WebMatrix, a cute layer on top of ADO.NET with support for the <code>dynamic</code> keyword (C# 4) so that you can directly call property equivalent to your column names.</p>
<p>Bonus point is that even though is has been shipped with a heavy slant towards SQL Server (and its new compact counterpart) since it&#8217;s implemented on top of stock System.Data.Common we can use any provider with it including the great old-fashioned SQlite provider.</p>
<p>Say I have the following SQlite database:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1085" title="Schema" src="http://blog.neteril.org/wp-content/uploads/2011/01/schema.png" alt="Schema" width="645" height="92" /></p>
<p>That is populated with these values:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1086" title="Data" src="http://blog.neteril.org/wp-content/uploads/2011/01/data.png" alt="Data" width="658" height="119" /></p>
<p>You can now write code like this to query the database:</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using WebMatrix.Data;

class WebMatrixSample
{
	public static void Main ()
	{
		var db = Database.OpenConnectionString (&quot;Data Source=sqlite.db;Version=3;&quot;, &quot;Mono.Data.Sqlite&quot;);

		var result = db.Query (&quot;select * from Phonebook where Number glob '0*'&quot;);
		foreach (dynamic row in result)
			Console.WriteLine (&quot;({0:D2}) {1}: [{2}]&quot;, row.Id, row.Name, row.Number);

		var entry = db.QuerySingle (&quot;select * from Phonebook where Name = @0&quot;, &quot;Rupert&quot;);
		Console.WriteLine (&quot;Rupert number is {0} with id {1}&quot;, entry.Number, entry.Id);

		Console.WriteLine (&quot;but really his number is just {0}&quot;,
		                   db.QueryValue (&quot;select Number from Phonebook where Name = @0&quot;, &quot;Rupert&quot;));

		// And let's add my bank number
		db.Execute (&quot;insert into Phonebook(Name, Number) values (@0, @1)&quot;, &quot;Bank&quot;, &quot;01xxxxxxx&quot;);
	}
}
</pre>
<p>WebMatrix.Data assembly is now available when you compile Mono from Git master.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2011/01/22/webmatrix-data-on-mono/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Apachaï or playing around with Manos</title>
		<link>http://blog.neteril.org/2011/01/09/apachai-or-playing-around-with-manos/</link>
		<comments>http://blog.neteril.org/2011/01/09/apachai-or-playing-around-with-manos/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 02:58:39 +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=1060</guid>
		<description><![CDATA[Once upon a time As a lot of people I started doing programming during my HTML days when I needed to add a bit of interactivity with some layers of PHP. Realizing that what I was coding was both ugly and useless, I moved on to other stuff and distanced myself from web development altogether. [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><img src="http://blog.neteril.org/wp-content/uploads/2011/01/apachai-header-300x112.png" alt="Apachaï logo" title="apachai-header" width="300" height="112" class="aligncenter size-medium wp-image-1075" /></p>
<h3>Once upon a time</h3>
<p>As a lot of people I started doing programming during my HTML days when I needed to add a bit of interactivity with some layers of PHP. Realizing that what I was coding was both ugly and useless, I moved on to other stuff and distanced myself from web development altogether.</p>
<p>Meanwhile, the Web became much more feature-full than what it was at the time and when I took another dive these past weeks I grasped how it had grew since with HTML 5, CSS3 or jQuery (yeah I know I was out of the wheel for a long time) to the point it was actually enjoyable.</p>
<p>But what really motivated me to come back was the recent release by my esteemed colleague <a href="http://jacksonh.tumblr.com/">Jackson</a> of his <a href="http://manosdemono.org/">Manos</a> web framework which, even though designed for cartels, was at long last <a href="http://jacksonh.tumblr.com/post/1159500924/manos-de-mono-the-manifesto">providing</a> a simple environment and simple interface to read and output valid HTTP headers in .NET/Mono.</p>
<h3>The use case</h3>
<p>Since I never really bothered signing-up for these Twitter image sharing website for the two or three pics I post per year and since I had no need of a special app for a badass smartphone I don&#8217;t have, I was leaning towards something FOSS and simple I could deploy on my own server which of course I didn&#8217;t find (if I was mistaken, replace that part with &laquo;&nbsp;I love reinventing the wheel&nbsp;&raquo;).</p>
<p>Thus <a href="http://apch.fr">Apachaï</a> was born (on <a href="https://github.com/garuma/apachai">GitHub</a>). It&#8217;s a KISS solution to a basic workflow: &laquo;&nbsp;let me post a pic quickly and write my twitter message at the same time&nbsp;&raquo;. </p>
<p>It does so by leveraging Twitter&#8217;s SSO using code borrowed from <a href="http://tirania.org/blog/">Miguel de Icaza</a>&#8216;s <a href="https://github.com/migueldeicaza/TweetStation">TrollStation</a>. It also have some nice goodies like simple image effects courtesy of <a href="https://github.com/jpobst/Pinta">Pinta</a> (yay for easy code reuse). </p>
<p>Data management is handled by <a href="http://redis.io/">Redis</a> because it wouldn&#8217;t have been wicked enough without some NoSQL sparkles (nice thing though). Plus Redis is so lightweight that it is not a big dependency really.</p>
<p>Oh and because eating your own soup is good, Apachaï uses ParallelFx&#8217;s Future and continuations to process long-running operations without blocking Manos itself so it&#8217;s an example of using ParallelFx in a web context. I also made a choice of not using any specific templating system, MVC or whatnot. The HTML is always served as a basic empty container and all specific elements are dynamically filled with Javascript and some JSON serialization routes (see why Manos and futures fit?).</p>
<div id="attachment_1070" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.neteril.org/wp-content/uploads/2011/01/apachai-screen.jpg"><img src="http://blog.neteril.org/wp-content/uploads/2011/01/apachai-screen-300x196.jpg" alt="Apachaï screenshot" title="apachai-screen" width="300" height="196" class="size-medium wp-image-1070" /></a><p class="wp-caption-text">Apachaï screenshot</p></div>
<h3>Finally</h3>
<p>So to summarize:</p>
<ul>
<li>Apachaï is a small and lightweight photo and picture sharing application (for services like Twitter) built on the Manos framework
</li>
<li>A public instance for your usage is available at <a href="http://apch.fr">apch.fr</a>
</li>
<li>Code is hosted on GitHub at <a href="https://github.com/garuma/apachai">https://github.com/garuma/apachai</a>
</li>
<li>I will be giving a talk about Manos during upcoming FOSDEM as <a href="http://weblog.savanne.be/">Ruben</a> once again secured a Mono room.
</li>
</ul>
<p><em>PS: the name comes from <a href="http://en.wikipedia.org/wiki/List_of_Kenichi:_The_Mightiest_Disciple_characters#Apachai_Hopachai">this character</a> because that was what I was reading at the time.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2011/01/09/apachai-or-playing-around-with-manos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Porting, porting</title>
		<link>http://blog.neteril.org/2010/12/16/porting-porting/</link>
		<comments>http://blog.neteril.org/2010/12/16/porting-porting/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 16:36:05 +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=1036</guid>
		<description><![CDATA[The past few weeks, I have given some cycles to test and ultimately make sure existing ParallelFx softwares from the .NET world could run on our Mono implementation. In the end, I selected three pieces of code that were using ParallelFx extensively: the Parallel Extensions sample gallery, Microsoft Biology Foundation and RavenDB (triggered by Rob [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/migrainechick/4808597936/"><img src="http://blog.neteril.org/wp-content/uploads/2010/12/cat_penguin_doodle-300x184.png" alt="Cat thoughts by Deborah Leigh (Migraine Chick)" title="Cat thoughts by Deborah Leigh (Migraine Chick)" width="300" height="184" class="aligncenter size-medium wp-image-1037" /></a></p>
<p>The past few weeks, I have given some cycles to test and ultimately make sure existing ParallelFx softwares from the .NET world could run on our Mono implementation.</p>
<p>In the end, I selected three pieces of code that were using ParallelFx extensively: <a href="http://code.msdn.microsoft.com/ParExtSamples">the Parallel Extensions sample gallery</a>, <a href="http://research.microsoft.com/en-us/projects/bio/mbf.aspx">Microsoft Biology Foundation</a> and <a href="http://ravendb.net/">RavenDB</a> (triggered by Rob Ashton <a href="http://codeofrob.com/archive/2010/12/10/adventures-in-mono.aspx">work</a>).</p>
<p>As a result, I&#8217;m happy to say I was able to run most of the three of them and they were of a great help pinpointing some non obvious corner case of the API. Practical consequence is that to also run them you will need Mono from master.</p>
<p>Following is a bunch of notes specific to each of these projects:</p>
<h4>Parallel Extensions sample gallery</h4>
<p>This project actually also contains the parallel extras library which provides a bunch of new constructs and extensions to the classic ParallelFx API that you can reuse in your own project. </p>
<p>At the moment though, you should be aware that the license used doesn&#8217;t allow reusing the code on a platform different than Microsoft Windows but this will hopefully be changed in the near-future to use a wider free/open-source license.</p>
<p>In this gallery, I was only able to test the projects that didn&#8217;t specifically use non-supported library in Mono such as WPF. For the rest of them, using our xbuild tool does the trick of compiling the code.</p>
<p>If you happen to have a software that use one of those code path I hadn&#8217;t had a chance to test and if you can share the application with me I can also give it a spin.</p>
<h4>Microsoft Biology Foundation</h4>
<p>This project is a heavy user of almost everything in the framework ranging from concurrent collections to PLinq and is quite a hungry memory and CPU eater.</p>
<p>Since I couldn&#8217;t find a proper application leveraging this framework, I simply turned to the performance test suite bundled in the project which works fine although some test eats up quite a lot of memory (as always, running under sgen helps here).</p>
<p>The code actually requires a couple of extra tweaks if you want to run the performance test suite correctly but for compiling the core framework itself, again xbuild should be sufficient.</p>
<h4>RavenDB</h4>
<p>Last but not least, RavenDB is an engine part of the NoSQL and document database movement but with a slant towards .NET (with Linq integration for instance).</p>
<p>Rob Ashton decided to try to run the beast on Linux  and I gave him a hand to tackle the few incompatibilities between Mono and .NET result of which can be found in his GitHub repository: <a href="https://github.com/robashton/ravendb/tree/mono">https://github.com/robashton/ravendb/tree/mono</a></p>
<p>The test suite is running <a href="http://neteril.org/mono/raven.html">well enough</a> with a total of 531 tests passing out of 588. Some of the failure are perfectly normal (like the tests using Microsoft-only native librairies) and another good portion is probably casual portability mistake (like hardcoded path and such).</p>
<p>It would actually be much appreciated if those knowing how the framework work could help triage these failures and find what is Mono bugs and what is not so that we can fix them.</p>
<p>Some tests also depend on not implemented features in Mono so if you feel like it, you could also contribute these missing code pieces or provide a workaround in RavenDB.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2010/12/16/porting-porting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Being a coding monkey (again)</title>
		<link>http://blog.neteril.org/2010/07/19/being-a-coding-monkey-again/</link>
		<comments>http://blog.neteril.org/2010/07/19/being-a-coding-monkey-again/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 17:12:12 +0000</pubDate>
		<dc:creator>Jérémie Laval</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Mono]]></category>

		<guid isPermaLink="false">http://blog.neteril.org/?p=971</guid>
		<description><![CDATA[Monkey Face Following the informal one-month internship I did last summer, I will be back at Novell in lovely Dublin offices this time for a full-blown seven months session starting in August. As you can expect, my main area of work will be ParallelFx and other 4.0 goodness but I hope to do some other [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/sentrawoods/3658290263/"><img src="http://blog.neteril.org/wp-content/uploads/2010/07/monkey_face.jpg" alt="Monkey Face by Sentrawoods" title="Monkey Face" width="400" height="305" class="aligncenter size-full wp-image-973" /></a><br /><em>Monkey Face</em></p>
<p>Following the informal one-month internship I did last summer, I will be back at <a href="http://www.novell.com">Novell</a> in lovely Dublin offices this time for a full-blown seven months session starting in August.</p>
<p>As you can expect, my main area of work will be ParallelFx and other 4.0 goodness but I hope to do some <a href="http://blog.neteril.org/2010/06/18/tying-mono-and-opencl/">other interesting work</a> on the side.</p>
<p>I very much look forward to this new opportunity of working full time on the ever awesome Mono and with its talented hacker team.</p>
<p>See you around a (Guinness) pint!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2010/07/19/being-a-coding-monkey-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tying Mono and OpenCL</title>
		<link>http://blog.neteril.org/2010/06/18/tying-mono-and-opencl/</link>
		<comments>http://blog.neteril.org/2010/06/18/tying-mono-and-opencl/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 17:09:01 +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=939</guid>
		<description><![CDATA[One of the cool buzzword these days beside parallel computing is GPGPU as in General Purpose GPU. The base idea of GPGPU is to allow a programmer to tape in the parallel processing capacities of a GPU to do something different than pixel crushing (even though it mostly boils down to that very application most [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.flickr.com/photos/un_owen/166787202/"><img src="http://blog.neteril.org/wp-content/uploads/2010/06/tortoise_hare.jpg" alt="tortoise_hare" title="tortoise_hare" width="507" height="380" class="aligncenter size-full wp-image-953" /></a></p>
<p>One of the cool buzzword these days beside parallel computing is GPGPU as in General Purpose GPU.</p>
<p>The base idea of GPGPU is to allow a programmer to tape in the parallel processing capacities of a GPU to do something different than pixel crushing (even though it mostly boils down to that very application most of time). </p>
<p>GPGPU isn&#8217;t new and for a long time vendors have provided their own rather low-level toolkit to program arbitrarily a GPU. As often, someone stepped up one day and proposed a unified API on top of all the vendor specificities. In our case, that API is a standard defined by the <a href="http://www.khronos.org/">Khronos group</a> (think OpenGL) and is named <a href="http://www.khronos.org/opencl/">OpenCL</a>.</p>
<p>OpenCL defines both a high-level C API to manipulate GPU (plus other friends) and a C-like intermediate language that is compiled and ultimately run on the device. It&#8217;s actually the same model as shader programming.</p>
<p>In the pursuit of <a href="http://www.mono-project.com">Mono</a> world-domination and following the implementation of PLinq that strived to be an easy way for programmer to access the multicore architecture of our processors via Linq, I hereby introduce <em>GLinq</em> (unoriginal acronym for GPU Linq) which this time use your graphic card to execute Linq queries via OpenCL. </p>
<p>GLinq is still much in its infancy and currently only support the Linq&#8217;s Select operator but I hope to be able to implement several other operators (at least the classic Where-Aggregate combo). The end goal is also to provide a new set of operator to allow OpenGL code to access the results of the computation without doing a roundtrip between CPU and GPU.</p>
<p>As I said previously, GLinq has the same design goal as PLinq which was to provide a totally new execution model for programmer in the most transparent way possible and with little modification to existing code. In our case, this prerequisite is rather tricky since you are juggling between two totally different worlds.</p>
<p>GLinq tries to provide that seamless experience with two features. The first one is the use of expression trees and C# compiler lambda magic to automatically capture the sense of a C# expression and rewrite it to OpenCL intermediate language. The second one is an automatic mapping of C# types and methods (e.g. Math class functions) to corresponding OpenCL symbols without however sacrificing OpenCL specificities which are also exposed through a C# API (not complete). </p>
<p>Of course, the GLinq API is still a transcription of standard Linq so you use it in the same way via the GpuEnumerable class. At the moment, the only input support are Range and Repeat but that will easily be changed to support any kind of IEnumerable.</p>
<p>Below is an example of the kind of query you can already execute:</p>
<pre class="brush: csharp; title: ; notranslate">

var query = GpuEnumerable.Range (-20, 50)
			 .Select ((i) =&gt; i * -2 + 3)
			 .Select ((i) =&gt; Math.Abs (i))
			 .Select ((i) =&gt; ExtraMath.Ldexp ((float)i, 2f))
			 .Select ((i) =&gt; (int)i);

foreach (var i in query)
	Console.Write (&quot;{0}, &quot;, i.ToString ());
</pre>
<p>From what you can see, there are a lot of select operators here. It comes from the fact that the compiler is only able to convert a pure expression lambda to its corresponding expression tree. You can circumvent this limitation by building yourself the expression tree or by using any compiler/interpreter that outputs expression trees (e.g. IronPython, IronRuby, Bechamel).</p>
<p>On a final note, there is an acknowledged bug in at least NVidia implementation of OpenCL which makes Mono doesn&#8217;t play nice with it. This is due to the fact that (most) OpenCL implementations use LLVM for code generation/optimization which in turns mess with Mono internal working.</p>
<p>This problem is going to be fixed in the next NVidia driver iteration but as a work-around you can apply <a href="http://monobin.com/__md461851">this simple patch</a> to mono. I put <del datetime="2010-06-18T18:01:11+00:00">SIGWINCH</del>SIGXFSZ there because it looks cool and seems generally unused but any other should do the trick.</p>
<p>Code in its proof-of-concept form is living here: <a href="http://git.neteril.org/glinq/">http://git.neteril.org/glinq/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2010/06/18/tying-mono-and-opencl/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>PLinq is in</title>
		<link>http://blog.neteril.org/2010/04/17/plinq-is-in/</link>
		<comments>http://blog.neteril.org/2010/04/17/plinq-is-in/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 22:42:56 +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=889</guid>
		<description><![CDATA[At long last, PLinq has finally found its way into Mono trunk as what can be considered a preview release. The code has seen a major rewrite compared to the initial implementation done during earlier Google Summer of Code which lacked flexibility and correctness. Public API is complete except some operator still not implemented. In [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><div id="attachment_890" class="wp-caption aligncenter" style="width: 517px"><a href="http://www.flickr.com/photos/ecstaticist/3055718118/"><img src="http://blog.neteril.org/wp-content/uploads/2010/04/header_plinq.jpg" alt="The Delta by ecstaticist under CC by-nc-sa" title="The Delta by ecstaticist under CC by-nc-sa" width="507" height="306" class="size-full wp-image-890" /></a><p class="wp-caption-text">It's all about splitting work</p></div></p>
<p>At long last, <a href="http://msdn.microsoft.com/en-us/library/dd460688(VS.100).aspx">PLinq</a> has finally <a href="http://twitter.com/migueldeicaza/status/12241543855">found its way into Mono trunk</a> as what can be considered a preview release. The code has seen a major rewrite compared to the initial implementation done during earlier Google Summer of Code which lacked flexibility and correctness.</p>
<p>Public API is complete except some operator still not implemented. In addition and as implied by the preview title, the current code hasn&#8217;t been tested against all possible flavor of query so it might or might not work for you (i.e. deadlock). If that&#8217;s the case, don&#8217;t hesitate to fill a bug report with a query reproducing the problem. The more query I have, the more robust we can shape future release.</p>
<p>By the way, these <a href="http://blog.neteril.org/2009/08/16/how-to-get-the-max-out-of-your-plinq-query/">PLinq performance tips</a> still hold true.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2010/04/17/plinq-is-in/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mono @ OpenJam.ie</title>
		<link>http://blog.neteril.org/2010/03/22/mono-openjam-ie/</link>
		<comments>http://blog.neteril.org/2010/03/22/mono-openjam-ie/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 14:56:20 +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=868</guid>
		<description><![CDATA[The Ubuntu-ie folks are running a slightly tuned Ubuntu Global Jam here in Dublin on Saturday 27th March where basically everyone is welcome to drop by and slackwork on any project he wants. The event has been dubbed OpenJam and every Mono hacker/enthusiast/bystander is most welcome to register on the Mono Corner of the Signup [...]]]></description>
			<content:encoded><![CDATA[<p align="center" style="text-align: center; padding-top: 0.5em; padding-bottom: 0.5em; margin-bottom: 1em;"><img src="http://blog.neteril.org/wp-content/uploads/2010/03/ubuntu07-ie_logo.png" alt="ubuntu07-ie_logo" title="ubuntu07-ie_logo" width="346" height="90" /> <img src="http://blog.neteril.org/wp-content/uploads/2010/03/mono-ireland.png" alt="mono-ireland" title="mono-ireland" width="100" height="120" ></p>
<p>The <a href="http://ubuntu-ie.org/">Ubuntu-ie</a> folks are running a slightly tuned Ubuntu Global Jam here in Dublin on Saturday 27th March where basically everyone is welcome to drop by and <del>slack</del>work on any project he wants.</p>
<p>The event has been dubbed <a href="http://openevents.ie/doku.php?id=openjam">OpenJam</a> and every Mono  hacker/enthusiast/bystander is most welcome to register on the Mono Corner of the <a href="http://openevents.ie/doku.php?id=openjam-signup">Signup page</a>.</p>
<p>More informations and day program is available on <a href="http://www.lczajkowski.com/2010/03/22/openjam-the-irish-ubuntu-global-jam/">Laura&#8217;s blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.neteril.org/2010/03/22/mono-openjam-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

