<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: The X=X+1 Issue</title>
	<atom:link href="http://www.linux-mag.com/id/6121/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linux-mag.com/id/6121/</link>
	<description>Open Source, Open Standards</description>
	<lastBuildDate>Sat, 05 Oct 2013 13:48:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: AdmnUnpwnd</title>
		<link>http://www.linux-mag.com/id/6121/#comment-9919</link>
		<dc:creator>AdmnUnpwnd</dc:creator>
		<pubDate>Sat, 06 Aug 2011 13:26:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/6121/#comment-9919</guid>
		<description>Thank You very much! I was thinking about asking this to my mathematics teacher. So the &#039;=&#039; in BASIC, or in any other language, is like the STO -&gt; (store) key in TI BASIC.</description>
		<content:encoded><![CDATA[<p>Thank You very much! I was thinking about asking this to my mathematics teacher. So the &#8216;=&#8217; in BASIC, or in any other language, is like the STO -&gt; (store) key in TI BASIC.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fernandoaren</title>
		<link>http://www.linux-mag.com/id/6121/#comment-5412</link>
		<dc:creator>fernandoaren</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/6121/#comment-5412</guid>
		<description>10 Neat. &lt;br /&gt;
20 And now you tell me there&#039;s something else than BASIC &lt;br /&gt;
30 Geez.&lt;br /&gt;
40 GOTO 10</description>
		<content:encoded><![CDATA[<p>10 Neat. <br />
20 And now you tell me there&#8217;s something else than BASIC <br />
30 Geez.<br />
40 GOTO 10</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tphillips</title>
		<link>http://www.linux-mag.com/id/6121/#comment-5413</link>
		<dc:creator>tphillips</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/6121/#comment-5413</guid>
		<description>Maybe it&#039;s just me, or maybe it&#039;s just a clumsy example, but it looks to me as if you &lt;em&gt;are&lt;/em&gt; telling the computer how to do the sum.  You are just telling it how using recursion rather than looping.&lt;br /&gt;
&lt;br /&gt;
I&#039;m not saying it&#039;s completely equivalent, but it doesn&#039;t seem to be clearly superior.&lt;br /&gt;
&lt;br /&gt;
Not in this case, anyway.</description>
		<content:encoded><![CDATA[<p>Maybe it&#8217;s just me, or maybe it&#8217;s just a clumsy example, but it looks to me as if you <em>are</em> telling the computer how to do the sum.  You are just telling it how using recursion rather than looping.</p>
<p>I&#8217;m not saying it&#8217;s completely equivalent, but it doesn&#8217;t seem to be clearly superior.</p>
<p>Not in this case, anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ruzam</title>
		<link>http://www.linux-mag.com/id/6121/#comment-5414</link>
		<dc:creator>ruzam</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/6121/#comment-5414</guid>
		<description>I&#039;m sure there will be more of a point to this later, but all you&#039;ve demonstrated is recursive style vs non-recursive style which doesn&#039;t have much of anything to do with imperative vs declarative style.&lt;br /&gt;
&lt;br /&gt;
You&#039;re SUM() example could be just as easily coded as a &#039;single assignment&#039; recursive function in any procedural language that support s recursion (in as few lines with as much programmer efficiency).  But as you say &quot;how the rules are executed is up the declarative language&quot;.  How the rules are executed is also up to the imperative language.  Each coding method can be equally tuned (or broken) for parallel execution.</description>
		<content:encoded><![CDATA[<p>I&#8217;m sure there will be more of a point to this later, but all you&#8217;ve demonstrated is recursive style vs non-recursive style which doesn&#8217;t have much of anything to do with imperative vs declarative style.</p>
<p>You&#8217;re SUM() example could be just as easily coded as a &#8216;single assignment&#8217; recursive function in any procedural language that support s recursion (in as few lines with as much programmer efficiency).  But as you say &#8220;how the rules are executed is up the declarative language&#8221;.  How the rules are executed is also up to the imperative language.  Each coding method can be equally tuned (or broken) for parallel execution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lilmikey93</title>
		<link>http://www.linux-mag.com/id/6121/#comment-5415</link>
		<dc:creator>lilmikey93</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/6121/#comment-5415</guid>
		<description>This seems fitting.&lt;br /&gt;
&lt;br /&gt;
Hey Hey 16k.&lt;br /&gt;
&lt;br /&gt;
http://www2.b3ta.com/heyhey16k/&lt;br /&gt;
&lt;br /&gt;
Enjoy the video.</description>
		<content:encoded><![CDATA[<p>This seems fitting.</p>
<p>Hey Hey 16k.</p>
<p><a href="http://www2.b3ta.com/heyhey16k/" rel="nofollow">http://www2.b3ta.com/heyhey16k/</a></p>
<p>Enjoy the video.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gsmyth</title>
		<link>http://www.linux-mag.com/id/6121/#comment-5416</link>
		<dc:creator>gsmyth</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/6121/#comment-5416</guid>
		<description>Is multiple assignment bad in parallel computing? In parallel programming we would essentially  look at what level of granularity we want to break down the data to be processed over the number of recursive loops to process and assign the computations to threads over various cores. The issue would be synchronising the partial results into a shared location and the synchronisation overhead in this case although necessary would slow the computation down. (assuming thread-safe libraries).&lt;br /&gt;
Or perhaps say a high level of granularity would be better and increase the time period between synchronisation points. This discussion may be useful to mention and further comment in the article.&lt;br /&gt;
Checking on metrics via sar or clock execution times will determine how well the granularity is performing.</description>
		<content:encoded><![CDATA[<p>Is multiple assignment bad in parallel computing? In parallel programming we would essentially  look at what level of granularity we want to break down the data to be processed over the number of recursive loops to process and assign the computations to threads over various cores. The issue would be synchronising the partial results into a shared location and the synchronisation overhead in this case although necessary would slow the computation down. (assuming thread-safe libraries).<br />
Or perhaps say a high level of granularity would be better and increase the time period between synchronisation points. This discussion may be useful to mention and further comment in the article.<br />
Checking on metrics via sar or clock execution times will determine how well the granularity is performing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: avagothen</title>
		<link>http://www.linux-mag.com/id/6121/#comment-5417</link>
		<dc:creator>avagothen</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/6121/#comment-5417</guid>
		<description>Very nice idea on a very real problem.&lt;br /&gt;
Unfortunately, your recursive solution will not run any faster on a parallel machine as each iteration depends on, and so has to wait for, the result of the next before completing.  Likewise, each iteration can only be spawned by the one before.  &lt;br /&gt;
&lt;br /&gt;
Any code inserted between &quot;NEW_I=I-1&quot; and &quot;RETURN...&quot; could be run in parallel, but only if NEW_I isn&#039;t (or can&#039;t be) changed within that block.  It would take some dandy compiler or interpreter to work out if/how to parallelise that.&lt;br /&gt;
&lt;br /&gt;
Could such a piece of software be the solution to this whole problem?  If so, the procedural/declarative distinction would become largely irrelevant.  More likely, the programmer has to be smart, not the software.&lt;br /&gt;
&lt;br /&gt;
On the plus side, it does abstract the problem by a level and gets people thinking about it.  Hmmm...</description>
		<content:encoded><![CDATA[<p>Very nice idea on a very real problem.<br />
Unfortunately, your recursive solution will not run any faster on a parallel machine as each iteration depends on, and so has to wait for, the result of the next before completing.  Likewise, each iteration can only be spawned by the one before.  </p>
<p>Any code inserted between &#8220;NEW_I=I-1&#8243; and &#8220;RETURN&#8230;&#8221; could be run in parallel, but only if NEW_I isn&#8217;t (or can&#8217;t be) changed within that block.  It would take some dandy compiler or interpreter to work out if/how to parallelise that.</p>
<p>Could such a piece of software be the solution to this whole problem?  If so, the procedural/declarative distinction would become largely irrelevant.  More likely, the programmer has to be smart, not the software.</p>
<p>On the plus side, it does abstract the problem by a level and gets people thinking about it.  Hmmm&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rosbif</title>
		<link>http://www.linux-mag.com/id/6121/#comment-5418</link>
		<dc:creator>rosbif</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/6121/#comment-5418</guid>
		<description>300 baud ???&lt;br /&gt;
&lt;br /&gt;
Boy, your ASR33 was _fast_ ;-)&lt;br /&gt;
&lt;br /&gt;
Mine was 110 baud :(</description>
		<content:encoded><![CDATA[<p>300 baud ???</p>
<p>Boy, your ASR33 was _fast_ ;-)</p>
<p>Mine was 110 baud :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kavadias</title>
		<link>http://www.linux-mag.com/id/6121/#comment-5419</link>
		<dc:creator>kavadias</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/6121/#comment-5419</guid>
		<description>Interesting!! Your definition of  SUM(1) and SUM(I) is close to the definition&lt;br /&gt;
SUM(I,J) if (I==J) THEN RETURN J&lt;br /&gt;
   ELSE RETURN { SUM( I, (I+J)/2 ) + SUM( ((I+J)/2)+1, J ) }&lt;br /&gt;
&lt;br /&gt;
that is easier to parallelize. In this sense it might make easier for programmers to learn how to write parallelizable code. But this can be done all the same in imperative programming, although it may take some (more?) training, and is only because of the more abstract approach to &quot;what&quot; instead of &quot;how&quot; ...&lt;br /&gt;
    Other than that I&#039;m very curious what you can make out of not using multiple assignment. My SUM(I,J) (implicitely) introduces a tree of intermediate variables that would help parallelization. This is because of recursion that is closer to parallelization of the devide-and-conquer style...</description>
		<content:encoded><![CDATA[<p>Interesting!! Your definition of  SUM(1) and SUM(I) is close to the definition<br />
SUM(I,J) if (I==J) THEN RETURN J<br />
   ELSE RETURN { SUM( I, (I+J)/2 ) + SUM( ((I+J)/2)+1, J ) }</p>
<p>that is easier to parallelize. In this sense it might make easier for programmers to learn how to write parallelizable code. But this can be done all the same in imperative programming, although it may take some (more?) training, and is only because of the more abstract approach to &#8220;what&#8221; instead of &#8220;how&#8221; &#8230;<br />
    Other than that I&#8217;m very curious what you can make out of not using multiple assignment. My SUM(I,J) (implicitely) introduces a tree of intermediate variables that would help parallelization. This is because of recursion that is closer to parallelization of the devide-and-conquer style&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: loup-vaillant</title>
		<link>http://www.linux-mag.com/id/6121/#comment-5420</link>
		<dc:creator>loup-vaillant</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.linux-mag.com/id/6121/#comment-5420</guid>
		<description>&lt;p&gt;For those who talk about recursive vs iterative: the point isn\&#039;t one being more declarative than the other. The point is we don\&#039;t need &lt;code&gt;while&lt;/code&gt; loops. Therefore, we don\&#039;t need that evil multiple assignment¹. If you ban it, or at least isolate it in well defined parts of the program, you will enable or simplify many optimizations. Being more declarative is just a bonus —a huge one, by the way.&lt;/p&gt;
&lt;p&gt;Now, using C or C++ without multiple assignment is hardly more suicidal than declarative. Functional languages, on the other hand, make this possible, thanks to \&quot;first class\&quot; functions.&lt;/p&gt;
&lt;p&gt;Sure, this particular example was bad. The better one would be:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sum(n) { return fold(+, 0, list(1, n)); }&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;where we assume that the &lt;code&gt;+&lt;/code&gt; function is associative. &lt;code&gt;list()&lt;/code&gt; just generates a list, and &lt;code&gt;fold()&lt;/code&gt; applies an binary, associative operation to a list. For example, &lt;code&gt;sum(4)&lt;/code&gt; could be computed as &lt;code&gt;((1+2)+3)+4&lt;/code&gt; or &lt;code&gt;(1+2)+(3+4)&lt;/code&gt;. The first one can be optimized for a single thread and low stack usage, and the second one can be parallelized. In both cases, you can even avoid the construction of the list (it has been done). What makes these optimizations possible is the high abstraction of this code. Such abstraction is nearly impossible if the compiler have to worry about order of execution. If multiple assignment wasn\&#039;t banned or contained, it would have to.&lt;/p&gt;
&lt;p&gt;Therefore, multiple assignment is bad for parallel.&lt;/p&gt;
&lt;p&gt;[1] http://theroleplayingprogrammer.blogspot.com/2009/06/assignment-considered-harmfull.html
&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>For those who talk about recursive vs iterative: the point isn\&#8217;t one being more declarative than the other. The point is we don\&#8217;t need <code>while</code> loops. Therefore, we don\&#8217;t need that evil multiple assignment¹. If you ban it, or at least isolate it in well defined parts of the program, you will enable or simplify many optimizations. Being more declarative is just a bonus —a huge one, by the way.</p>
<p>Now, using C or C++ without multiple assignment is hardly more suicidal than declarative. Functional languages, on the other hand, make this possible, thanks to \&#8221;first class\&#8221; functions.</p>
<p>Sure, this particular example was bad. The better one would be:</p>
<p><code>sum(n) { return fold(+, 0, list(1, n)); }</code></p>
<p>where we assume that the <code>+</code> function is associative. <code>list()</code> just generates a list, and <code>fold()</code> applies an binary, associative operation to a list. For example, <code>sum(4)</code> could be computed as <code>((1+2)+3)+4</code> or <code>(1+2)+(3+4)</code>. The first one can be optimized for a single thread and low stack usage, and the second one can be parallelized. In both cases, you can even avoid the construction of the list (it has been done). What makes these optimizations possible is the high abstraction of this code. Such abstraction is nearly impossible if the compiler have to worry about order of execution. If multiple assignment wasn\&#8217;t banned or contained, it would have to.</p>
<p>Therefore, multiple assignment is bad for parallel.</p>
<p>[1] <a href="http://theroleplayingprogrammer.blogspot.com/2009/06/assignment-considered-harmfull.html" rel="nofollow">http://theroleplayingprogrammer.blogspot.com/2009/06/assignment-considered-harmfull.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>