<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>Aleš Šturala &#124; Blog &#124; english version</title>
	<link>http://en.unitedstatesof.net</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Thu, 11 Sep 2008 18:50:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>2) DLR - Scanner</title>
		<link>http://en.unitedstatesof.net/2008/09/11/2-dlr-scanner/</link>
		<comments>http://en.unitedstatesof.net/2008/09/11/2-dlr-scanner/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 18:50:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[DLR]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[dynamic language runtime]]></category>

		<category><![CDATA[IPL]]></category>

		<category><![CDATA[ToyScript]]></category>

		<guid isPermaLink="false">http://en.unitedstatesof.net/2008/09/11/2-dlr-scanner/</guid>
		<description><![CDATA[In the first chapter I described common architecture of .NET language compiler. There are usually three parts - scanner, parser and generator of CIL code. But building a language on the DLR slightly differs because instead of CIL code is produced DLR abstract syntax tree (DLR AST).
]]></description>
			<content:encoded><![CDATA[<p>In the first chapter I described common architecture of .NET language compiler. There are usually three parts - scanner, parser and generator of CIL code. But building a language on the DLR slightly differs because instead of CIL code is produced DLR abstract syntax tree (DLR AST).<br />
 <a href="http://en.unitedstatesof.net/2008/09/11/2-dlr-scanner/#more-58" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://en.unitedstatesof.net/2008/09/11/2-dlr-scanner/feed/</wfw:commentRss>
		</item>
		<item>
		<title>1) DLR - Introduction into implementation of .NET languages</title>
		<link>http://en.unitedstatesof.net/2008/08/14/1-dlr-introduction-into-implementation-of-net-languages/</link>
		<comments>http://en.unitedstatesof.net/2008/08/14/1-dlr-introduction-into-implementation-of-net-languages/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 20:35:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[DLR]]></category>

		<category><![CDATA[dynamic language runtime]]></category>

		<category><![CDATA[IronPython]]></category>

		<category><![CDATA[IronRuby]]></category>

		<category><![CDATA[ToyScript]]></category>

		<guid isPermaLink="false">http://en.unitedstatesof.net/2008/08/14/1-dlr-introduction-into-implementation-of-net-languages/</guid>
		<description><![CDATA[I’m not an English native speaker however I decided to write this tutorial in my poor Czech English because there isn’t much information about implementing dynamic languages on the DLR.
Why dynamic languages?
Dynamic languages have more flexible type system and they are more convenient to rapid development. Two examples of dynamic languages are Python and Ruby, [...]]]></description>
			<content:encoded><![CDATA[<p>I’m not an English native speaker however I decided to write this tutorial in my poor Czech English because there isn’t much information about implementing dynamic languages on the DLR.</p>
<h3>Why dynamic languages?</h3>
<p>Dynamic languages have more flexible type system and they are more convenient to rapid development. Two examples of dynamic languages are Python and Ruby, both of which are widely used for web development.</p>
<p> <a href="http://en.unitedstatesof.net/2008/08/14/1-dlr-introduction-into-implementation-of-net-languages/#more-57" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://en.unitedstatesof.net/2008/08/14/1-dlr-introduction-into-implementation-of-net-languages/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to interact Bluetooth from.NET Compact Framework</title>
		<link>http://en.unitedstatesof.net/2008/05/22/how-to-interact-bluetooth-fromnet-compact-framework/</link>
		<comments>http://en.unitedstatesof.net/2008/05/22/how-to-interact-bluetooth-fromnet-compact-framework/#comments</comments>
		<pubDate>Thu, 22 May 2008 19:34:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://en.unitedstatesof.net/2008/05/22/how-to-interact-bluetooth-fromnet-compact-framework/</guid>
		<description><![CDATA[Bluetooth is wireless technology used mostly in small devices and electronic gadgets like PDA for data transfer between devices. As a common user it is very easy to use Bluetooth and you can fully enjoy all provided features, but from developer’s point of view, it can be quite frustrating to develop applications using Bluetooth in [...]]]></description>
			<content:encoded><![CDATA[<p>Bluetooth is wireless technology used mostly in small devices and electronic gadgets like PDA for data transfer between devices. As a common user it is very easy to use Bluetooth and you can fully enjoy all provided features, but from developer’s point of view, it can be quite frustrating to develop applications using Bluetooth in C# or VB.NET, because it isn’t as easy as you would expect.<br />
 <a href="http://en.unitedstatesof.net/2008/05/22/how-to-interact-bluetooth-fromnet-compact-framework/#more-56" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://en.unitedstatesof.net/2008/05/22/how-to-interact-bluetooth-fromnet-compact-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Introduction to Dynamic Language Runtime</title>
		<link>http://en.unitedstatesof.net/2008/03/09/introduction-to-dlr/</link>
		<comments>http://en.unitedstatesof.net/2008/03/09/introduction-to-dlr/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 21:16:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[DLR]]></category>

		<guid isPermaLink="false">http://en.unitedstatesof.net/2008/03/09/introduction-to-dlr/</guid>
		<description><![CDATA[This is supposed to be short introduction to DLR - Dynamic Language Runtime. DLR is a new layer on static CLR used to implement dynamic languages on .NET. Simply said, DLR hides all the tough stuff you have to deal with, if you want to implement dynamic language on static CLR.
If you are interested in [...]]]></description>
			<content:encoded><![CDATA[<p>This is supposed to be short introduction to DLR - <i>D</i>ynamic <i>L</i>anguage <i>R</i>untime. DLR is a new layer on static CLR used to implement dynamic languages on .NET. Simply said, DLR hides all the tough stuff you have to deal with, if you want to implement dynamic language on static CLR.<br />
If you are interested in implementation of programming languages, especially dynamic languages, for .NET and you want to play with DLR, here are few important points:</p>
<p> <a href="http://en.unitedstatesof.net/2008/03/09/introduction-to-dlr/#more-55" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://en.unitedstatesof.net/2008/03/09/introduction-to-dlr/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Unit testing events</title>
		<link>http://en.unitedstatesof.net/2008/02/22/unit-testing-events/</link>
		<comments>http://en.unitedstatesof.net/2008/02/22/unit-testing-events/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 01:23:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://en.unitedstatesof.net/2008/02/22/unit-testing-events/</guid>
		<description><![CDATA[Maybe you have already been in a situation, when you needed to test public events on some tested class. Problem is, how to suspend a test for some time when event calls are expected and how to log if events were really invoked as expected.
Here is my simple solution &#8230;
]]></description>
			<content:encoded><![CDATA[<p>Maybe you have already been in a situation, when you needed to test public events on some tested class. Problem is, how to suspend a test for some time when event calls are expected and how to log if events were really invoked as expected.<br />
Here is my simple solution &#8230;<br />
 <a href="http://en.unitedstatesof.net/2008/02/22/unit-testing-events/#more-54" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://en.unitedstatesof.net/2008/02/22/unit-testing-events/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Foldr in C#</title>
		<link>http://en.unitedstatesof.net/2008/02/10/foldr-in-csharp/</link>
		<comments>http://en.unitedstatesof.net/2008/02/10/foldr-in-csharp/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 21:43:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Func. programming]]></category>

		<guid isPermaLink="false">http://en.unitedstatesof.net/2008/02/10/foldr-in-c/</guid>
		<description><![CDATA[Do you know Foldr? Foldr is a function we can find in most of functional programming languages like Haskell (Foldr) or F# (List.Fold_r). It is useful when you need to process all elements in a list and return just one result value (not list), such as &#8217;sum all numbers in a list&#8217;.
Foldr is not part [...]]]></description>
			<content:encoded><![CDATA[<p>Do you know <code>Foldr</code>? <code>Foldr</code> is a function we can find in most of functional programming languages like Haskell (<code>Foldr</code>) or F# (<code>List.Fold_r</code>). It is useful when you need to process all elements in a list and return just one result value (not list), such as &#8217;sum all numbers in a list&#8217;.</p>
<p><i>Foldr is not part of .NET framework, implementation of this function you can find at the end of this article</i>.</p>
<p>Foldr takes list of elements (<b><i>list</i></b>), default value (<b><i>def</i></b>) which behaves like a last value of the list and function (<b><i>fun</i></b>) which is applied to every two adjacent elements.</p>
<pre><code>form:           Foldr ( <b><i>list</i></b>, <b><i>def</i></b>, <b><i>fun</i></b> )</code></pre>
<p>How does it work? Let&#8217;s say you need to sum all elements in the list&#8230;</p>
<h2>Theory</h2>
<pre><code>form:           Foldr (  <b><i>list</i></b>,                 <b><i>def</i></b>,  <b><i>fun</i></b> )
code:           Foldr ( { 1,   2,   3,   4 },  0,    <i style="color: red">+</i> )
execution:                1 <i style="color: red">+</i> (2 <i style="color: red">+</i> (3 <i style="color: red">+</i> (4 <i style="color: red">+</i>   0)))      = 10
</code></pre>
<p> <a href="http://en.unitedstatesof.net/2008/02/10/foldr-in-csharp/#more-53" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://en.unitedstatesof.net/2008/02/10/foldr-in-csharp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TIP! C# 3.0 recursive functions</title>
		<link>http://en.unitedstatesof.net/2008/01/27/tip-c-30-recursive-functions/</link>
		<comments>http://en.unitedstatesof.net/2008/01/27/tip-c-30-recursive-functions/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 12:20:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Func. programming]]></category>

		<guid isPermaLink="false">http://foo.unitedstatesof.net/?p=37</guid>
		<description><![CDATA[In C# 3.0 there are some new features such as lambda expressions we can find mostly in a functional languages. But when I tried some functional-like possibilities of version 3.0 I was quite dispapointed because I couldn&#8217;t declare recursive functions.
So what was the problem? Lets look at this implementation of factorial function int -&#62; int [...]]]></description>
			<content:encoded><![CDATA[<p>In C# 3.0 there are some new features such as lambda expressions we can find mostly in a functional languages. But when I tried some functional-like possibilities of version 3.0 I was quite dispapointed because I couldn&#8217;t declare recursive functions.</p>
<p>So what was the problem? Lets look at this implementation of <code>factorial</code> function <code>int -&gt; int</code> (takes one int and returns int) using C# 3.0 lambda expressions:</p>
<p><strong>Test 1</strong></p>
<p><code STYLE="background-color: #ffd7d7">Func&lt;int, int&gt; fac = x =&gt; x == 0 ? 1 : x + <font STYLE="border-bottom-color: #000000; border-bottom-width: 1px; border-bottom-style: dotted">fac</font>(x - 1)</code></p>
<p>This is an optimal solution which unfortunatelly doesn&#8217;t work, we get an error message &#8220;<em>Use of unassigned local variable &#8216;fac&#8217;</em>&#8220;. We can&#8217;t use recursive calls like this, because compiler complains that <code>fac</code> is not declared when used.</p>
<p><strong>Test 2</strong><br />
Lets try to declare <code>fac</code> function one line before:</p>
<p><code STYLE="background-color: #ffd7d7">Func&lt;int, int&gt; fac;<br />
fac = x =&gt; x == 0 ? 1 : x + <font STYLE="border-bottom-color: #000000; border-bottom-width: 1px; border-bottom-style: dotted">fac</font>(x - 1);</code></p>
<p>Again, same error &#8220;<em>Use of unassigned local variable &#8216;fac&#8217;</em>&#8221;</p>
<p><strong>Test 3</strong></p>
<p><code STYLE="background-color: #d5ffd5">Func&lt;int, int&gt; fac = null;<br />
fac = x =&gt; x == 0 ? 1 : x + fac(x - 1);</code></p>
<p>Now it works! If you want to use recursive calls inside function you have to declare and assign <code>null</code> before body declaration. However here we can see that C# 3.0 doesn&#8217;t allow us to write sexy-one-line code like in a first test case.</p>
]]></content:encoded>
			<wfw:commentRss>http://en.unitedstatesof.net/2008/01/27/tip-c-30-recursive-functions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TIP! LINQ local variable</title>
		<link>http://en.unitedstatesof.net/2008/01/07/tip-linq-local-variable/</link>
		<comments>http://en.unitedstatesof.net/2008/01/07/tip-linq-local-variable/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 12:22:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://foo.unitedstatesof.net/?p=38</guid>
		<description><![CDATA[I found a new simple feature in LINQ, if you need localy defined variable in your query then just use let keyword.
Sample - function returning only even double numbers:

  int[] list = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

  IEnumerable&#60;int&#62; x = from l in list
   [...]]]></description>
			<content:encoded><![CDATA[<p>I found a new simple feature in LINQ, if you need localy defined variable in your query then just use <code>let</code> keyword.<br />
Sample - function returning only even double numbers:</p>
<p><code>
<pre><span style="color: #000000;">  </span><span style="color: #0000FF;">int</span><span style="color: #000000;">[] list </span><span style="color: #000000;">=</span><span style="color: #000000;"> { </span><span style="color: #800080;">1</span><span style="color: #000000;">, </span><span style="color: #800080;">2</span><span style="color: #000000;">, </span><span style="color: #800080;">3</span><span style="color: #000000;">, </span><span style="color: #800080;">4</span><span style="color: #000000;">, </span><span style="color: #800080;">5</span><span style="color: #000000;">, </span><span style="color: #800080;">6</span><span style="color: #000000;">, </span><span style="color: #800080;">7</span><span style="color: #000000;">, </span><span style="color: #800080;">8</span><span style="color: #000000;">, </span><span style="color: #800080;">9</span><span style="color: #000000;">, </span><span style="color: #800080;">10</span><span style="color: #000000;"> };

  IEnumerable</span><span style="color: #000000;">&lt;</span><span style="color: #0000FF;">int</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> x </span><span style="color: #000000;">=</span><span style="color: #000000;"> from l </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> list
                       <span style="background-color: yellow;">let dbl = l * l</span>
                       </span><span style="color: #0000FF;">where</span><span style="color: #000000;"> dbl </span><span style="color: #000000;">%</span><span style="color: #000000;"> </span><span style="color: #800080;">2</span><span style="color: #000000;"> </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">
                       select dbl;</span>

<span style="color: green;">          // result => 4, 16, 36, 64, 100</span>
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://en.unitedstatesof.net/2008/01/07/tip-linq-local-variable/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Haskel and F# comparsion</title>
		<link>http://en.unitedstatesof.net/2008/01/06/haskel-and-fsharp-comparsion/</link>
		<comments>http://en.unitedstatesof.net/2008/01/06/haskel-and-fsharp-comparsion/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 12:23:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Func. programming]]></category>

		<guid isPermaLink="false">http://en.unitedstatesof.net/?p=51</guid>
		<description><![CDATA[This is quick introduction to F# and its syntax for Haskell programmers. In this article, you can find essential operations written in both Haskell and F#. So if you have already some experience with Haskell then it will be easy to get into the secrets of F#.
Basics, Functions, Lists, Types and some others&#8230;
]]></description>
			<content:encoded><![CDATA[<p>This is quick introduction to F# and its syntax for Haskell programmers. In this article, you can find essential operations written in both Haskell and F#. So if you have already some experience with Haskell then it will be easy to get into the secrets of F#.</p>
<p>Basics, Functions, Lists, Types and some others&#8230;</p>
<p> <a href="http://en.unitedstatesof.net/2008/01/06/haskel-and-fsharp-comparsion/#more-51" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://en.unitedstatesof.net/2008/01/06/haskel-and-fsharp-comparsion/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
