<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for John&#039;s Coding Reflections</title>
	<atom:link href="http://metaljoe.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://metaljoe.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Sat, 23 Feb 2013 18:31:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Bit Counts in Python, Erlang and Clojure by Greg Burd</title>
		<link>http://metaljoe.wordpress.com/2010/08/12/bit-counts-in-python-erlang-and-clojure/#comment-205</link>
		<dc:creator><![CDATA[Greg Burd]]></dc:creator>
		<pubDate>Sat, 23 Feb 2013 18:31:47 +0000</pubDate>
		<guid isPermaLink="false">http://metaljoe.wordpress.com/?p=224#comment-205</guid>
		<description><![CDATA[%% Fixed my earlier comment (doh! sorry...)
-module(bitpop).
-export([count/1]).

count(0) -&gt; 0;
count(X)
  when is_integer(X), X &gt; 0, X 
    ((c4(X) bsr 16) + c4(X)) band 16#0000FFFF.
c1(V) -&gt; V - ((V bsr 1) band 16#55555555).
c2(V) -&gt; ((c1(V) bsr 2) band 16#33333333) + (c1(V) band 16#33333333).
c3(V) -&gt; ((c2(V) bsr 4) + c2(V)) band 16#0F0F0F0F.
c4(V) -&gt; ((c3(V) bsr 8) + c3(V)) band 16#00FF00FF.

-ifdef(TEST).

bitpop_test_() -&gt;
    [?_assertEqual(0, count(0)),
     ?_assertEqual(1, count(1)),
     ?_assertEqual(2, count(3)),
     ?_assertEqual(3, count(7)),
     ?_assertEqual(4, count(15)),
     ?_assertEqual(5, count(31)),
     ?_assertEqual(6, count(63)),
     ?_assertEqual(7, count(127)),
     ?_assertEqual(8, count(255)),
     ?_assertEqual(1, count(4)),
     ?_assertEqual(1, count(8)),
     ?_assertEqual(1, count(16)),
     ?_assertEqual(1, count(32)),
     ?_assertEqual(1, count(64)),
     ?_assertEqual(1, count(128)),
     ?_assertEqual(1, count(256)),
     ?_assertEqual(1, count(512)),
     ?_assertEqual(1, count(1024)),
     ?_assertEqual(1, count(2048)),
     ?_assertEqual(1, count(16#FFFF + 1)),
     ?_assertEqual(19, count(16#FFFFE)),
     ?_assertEqual(1, count(16#FFFFF + 1)),
     ?_assertEqual(23, count(16#FFFFFE)),
     ?_assertEqual(1, count(16#FFFFF + 1)),
     ?_assertEqual(27, count(16#FFFFFFE)),
     ?_assertEqual(1, count(16#FFFFF + 1)),
     ?_assertEqual(31, count(16#FFFFFFFE)),
     ?_assertException(error, function_clause, count(-1))].

-endif.]]></description>
		<content:encoded><![CDATA[<p>%% Fixed my earlier comment (doh! sorry&#8230;)<br />
-module(bitpop).<br />
-export([count/1]).</p>
<p>count(0) -&gt; 0;<br />
count(X)<br />
  when is_integer(X), X &gt; 0, X<br />
    ((c4(X) bsr 16) + c4(X)) band 16#0000FFFF.<br />
c1(V) -&gt; V &#8211; ((V bsr 1) band 16#55555555).<br />
c2(V) -&gt; ((c1(V) bsr 2) band 16#33333333) + (c1(V) band 16#33333333).<br />
c3(V) -&gt; ((c2(V) bsr 4) + c2(V)) band 16#0F0F0F0F.<br />
c4(V) -&gt; ((c3(V) bsr 8) + c3(V)) band 16#00FF00FF.</p>
<p>-ifdef(TEST).</p>
<p>bitpop_test_() -&gt;<br />
    [?_assertEqual(0, count(0)),<br />
     ?_assertEqual(1, count(1)),<br />
     ?_assertEqual(2, count(3)),<br />
     ?_assertEqual(3, count(7)),<br />
     ?_assertEqual(4, count(15)),<br />
     ?_assertEqual(5, count(31)),<br />
     ?_assertEqual(6, count(63)),<br />
     ?_assertEqual(7, count(127)),<br />
     ?_assertEqual(8, count(255)),<br />
     ?_assertEqual(1, count(4)),<br />
     ?_assertEqual(1, count(8)),<br />
     ?_assertEqual(1, count(16)),<br />
     ?_assertEqual(1, count(32)),<br />
     ?_assertEqual(1, count(64)),<br />
     ?_assertEqual(1, count(128)),<br />
     ?_assertEqual(1, count(256)),<br />
     ?_assertEqual(1, count(512)),<br />
     ?_assertEqual(1, count(1024)),<br />
     ?_assertEqual(1, count(2048)),<br />
     ?_assertEqual(1, count(16#FFFF + 1)),<br />
     ?_assertEqual(19, count(16#FFFFE)),<br />
     ?_assertEqual(1, count(16#FFFFF + 1)),<br />
     ?_assertEqual(23, count(16#FFFFFE)),<br />
     ?_assertEqual(1, count(16#FFFFF + 1)),<br />
     ?_assertEqual(27, count(16#FFFFFFE)),<br />
     ?_assertEqual(1, count(16#FFFFF + 1)),<br />
     ?_assertEqual(31, count(16#FFFFFFFE)),<br />
     ?_assertException(error, function_clause, count(-1))].</p>
<p>-endif.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bit Counts in Python, Erlang and Clojure by Greg Burd</title>
		<link>http://metaljoe.wordpress.com/2010/08/12/bit-counts-in-python-erlang-and-clojure/#comment-204</link>
		<dc:creator><![CDATA[Greg Burd]]></dc:creator>
		<pubDate>Thu, 14 Feb 2013 18:34:52 +0000</pubDate>
		<guid isPermaLink="false">http://metaljoe.wordpress.com/?p=224#comment-204</guid>
		<description><![CDATA[-module(bitpop).
-export([count/1]).

count(X) when is_integer(X), X &gt; 0 -&gt;
    M1  = 16#5555555555555555, %% 0101...
    M2  = 16#3333333333333333, %% 00110011..
    M4  = 16#0f0f0f0f0f0f0f0f, %% 4 zeros,  4 ones ...
    H01 = 16#0101010101010101, %% the sum of 256 to the power of 0,1,2,3...

    %% 1. put count of each 2 bits into those 2 bits
    X1 = X - (X bsr 1) band M1,
    %% 2. put count of each 4 bits into those 4 bits
    X2 = (X1 band M2) + ((X1 bsr 2) band M2),
    %% 3. put count of each 8 bits into those 8 bits
    X3 = (X2 + (X2 bsr 4)) band M4,
    %% 4. returns left 8 bits of x + (x&lt;&lt;8) + (x&lt;&lt;16) + (x&lt;&lt;24) + ...
    (X3 * H01) bsr 56.]]></description>
		<content:encoded><![CDATA[<p>-module(bitpop).<br />
-export([count/1]).</p>
<p>count(X) when is_integer(X), X &gt; 0 -&gt;<br />
    M1  = 16#5555555555555555, %% 0101&#8230;<br />
    M2  = 16#3333333333333333, %% 00110011..<br />
    M4  = 16#0f0f0f0f0f0f0f0f, %% 4 zeros,  4 ones &#8230;<br />
    H01 = 16#0101010101010101, %% the sum of 256 to the power of 0,1,2,3&#8230;</p>
<p>    %% 1. put count of each 2 bits into those 2 bits<br />
    X1 = X &#8211; (X bsr 1) band M1,<br />
    %% 2. put count of each 4 bits into those 4 bits<br />
    X2 = (X1 band M2) + ((X1 bsr 2) band M2),<br />
    %% 3. put count of each 8 bits into those 8 bits<br />
    X3 = (X2 + (X2 bsr 4)) band M4,<br />
    %% 4. returns left 8 bits of x + (x&lt;&lt;8) + (x&lt;&lt;16) + (x&lt;&lt;24) + &#8230;<br />
    (X3 * H01) bsr 56.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Aquamacs Erlang Support by Shekeen</title>
		<link>http://metaljoe.wordpress.com/2009/09/23/aquamacs-erlang-support/#comment-201</link>
		<dc:creator><![CDATA[Shekeen]]></dc:creator>
		<pubDate>Wed, 09 Jan 2013 20:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://metaljoe.wordpress.com/?p=70#comment-201</guid>
		<description><![CDATA[Oops, bad formatting
What i meant was instead of
(setq list (cons val list))
You can write
(add-to-list list val)]]></description>
		<content:encoded><![CDATA[<p>Oops, bad formatting<br />
What i meant was instead of<br />
(setq list (cons val list))<br />
You can write<br />
(add-to-list list val)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Aquamacs Erlang Support by Shekeen</title>
		<link>http://metaljoe.wordpress.com/2009/09/23/aquamacs-erlang-support/#comment-200</link>
		<dc:creator><![CDATA[Shekeen]]></dc:creator>
		<pubDate>Wed, 09 Jan 2013 20:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://metaljoe.wordpress.com/?p=70#comment-200</guid>
		<description><![CDATA[Instead of
    (setq  (cons  ))
You can simply write
    (add-to-list  &lt;val)]]></description>
		<content:encoded><![CDATA[<p>Instead of<br />
    (setq  (cons  ))<br />
You can simply write<br />
    (add-to-list  &lt;val)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP: One Year On by nryoung</title>
		<link>http://metaljoe.wordpress.com/2012/01/28/php-one-year-on/#comment-185</link>
		<dc:creator><![CDATA[nryoung]]></dc:creator>
		<pubDate>Tue, 31 Jan 2012 19:25:19 +0000</pubDate>
		<guid isPermaLink="false">http://metaljoe.wordpress.com/?p=264#comment-185</guid>
		<description><![CDATA[I like your idea of learning one language a year.I have very extensive knowledge of C++ but when I first saw Python, I fell in love. I am now doing something similar where I am blocking off 12 weeks to focus on becoming very proficient with Django + Python.

I still cringe a little whenever I look at PHP but that will probably be my next language to look in to.]]></description>
		<content:encoded><![CDATA[<p>I like your idea of learning one language a year.I have very extensive knowledge of C++ but when I first saw Python, I fell in love. I am now doing something similar where I am blocking off 12 weeks to focus on becoming very proficient with Django + Python.</p>
<p>I still cringe a little whenever I look at PHP but that will probably be my next language to look in to.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why I&#8217;m Still Learning Clojure by Octopusgrabbus</title>
		<link>http://metaljoe.wordpress.com/2010/09/20/why-im-still-learning-clojure/#comment-150</link>
		<dc:creator><![CDATA[Octopusgrabbus]]></dc:creator>
		<pubDate>Tue, 07 Jun 2011 15:46:49 +0000</pubDate>
		<guid isPermaLink="false">http://metaljoe.wordpress.com/?p=238#comment-150</guid>
		<description><![CDATA[Thank you for posting this. I am taking the slow approach to learning Clojure. 

Last year, I introduced Python into a production environment supporting a large municipal water utility upgrade project, so it will be a while before another language/tool is introduced. 

As to which Lisp is good or bad or whether macros are good or bad, will have to wait until I understand Clojure better. Right now, my first goal is to process a .csv file, which is the bread and butter data unit of our Automated Meter Reading (AMR) system.]]></description>
		<content:encoded><![CDATA[<p>Thank you for posting this. I am taking the slow approach to learning Clojure. </p>
<p>Last year, I introduced Python into a production environment supporting a large municipal water utility upgrade project, so it will be a while before another language/tool is introduced. </p>
<p>As to which Lisp is good or bad or whether macros are good or bad, will have to wait until I understand Clojure better. Right now, my first goal is to process a .csv file, which is the bread and butter data unit of our Automated Meter Reading (AMR) system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Things to look at in 2011 by Helmut</title>
		<link>http://metaljoe.wordpress.com/2011/01/23/things-to-look-at-in-2011/#comment-129</link>
		<dc:creator><![CDATA[Helmut]]></dc:creator>
		<pubDate>Sun, 23 Jan 2011 15:21:29 +0000</pubDate>
		<guid isPermaLink="false">http://metaljoe.wordpress.com/?p=246#comment-129</guid>
		<description><![CDATA[Greetings!

You&#039;ve got quite a nice list going there. Wish I had time for that much. This year I&#039;m also finally looking at PHP (and hopefully some web frameworks for PHP), maybe one of the NoSQL databases, and posibly some Android development (might have my first Android phone soon).

On another front, I might get an opportunity to work with OpenERP, which is Python-based. I&#039;m also working on a Django website that I want to launch next month. :) Lots planned, but not sure if I will get it all done. :-P

Good luck with your list! Hope to read more about your tech adventures regularly!]]></description>
		<content:encoded><![CDATA[<p>Greetings!</p>
<p>You&#8217;ve got quite a nice list going there. Wish I had time for that much. This year I&#8217;m also finally looking at PHP (and hopefully some web frameworks for PHP), maybe one of the NoSQL databases, and posibly some Android development (might have my first Android phone soon).</p>
<p>On another front, I might get an opportunity to work with OpenERP, which is Python-based. I&#8217;m also working on a Django website that I want to launch next month. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Lots planned, but not sure if I will get it all done. <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>Good luck with your list! Hope to read more about your tech adventures regularly!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on EuroPython 2010 by PyCon 2010, EuroPython 2010 &#124; Python Adventures</title>
		<link>http://metaljoe.wordpress.com/2010/07/24/europython-2010/#comment-96</link>
		<dc:creator><![CDATA[PyCon 2010, EuroPython 2010 &#124; Python Adventures]]></dc:creator>
		<pubDate>Tue, 19 Oct 2010 02:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://metaljoe.wordpress.com/?p=216#comment-96</guid>
		<description><![CDATA[[...] EuroPython is the European Python conference. It is aimed at everyone in the Python community, of all skill levels, both users and programmers. A lucky blogger was there, read his impressions here. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] EuroPython is the European Python conference. It is aimed at everyone in the Python community, of all skill levels, both users and programmers. A lucky blogger was there, read his impressions here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Out of the Comfort Zone by otfrom</title>
		<link>http://metaljoe.wordpress.com/2010/09/11/out-of-the-comfort-zone/#comment-73</link>
		<dc:creator><![CDATA[otfrom]]></dc:creator>
		<pubDate>Sat, 11 Sep 2010 08:34:16 +0000</pubDate>
		<guid isPermaLink="false">http://metaljoe.wordpress.com/?p=234#comment-73</guid>
		<description><![CDATA[Sounds like a great topic. Let us know when you want to do it. Given how much we struggled at the beginning I always wondered why people kept coming back to the dojos.]]></description>
		<content:encoded><![CDATA[<p>Sounds like a great topic. Let us know when you want to do it. Given how much we struggled at the beginning I always wondered why people kept coming back to the dojos.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Out of the Comfort Zone by John C</title>
		<link>http://metaljoe.wordpress.com/2010/09/11/out-of-the-comfort-zone/#comment-72</link>
		<dc:creator><![CDATA[John C]]></dc:creator>
		<pubDate>Sat, 11 Sep 2010 08:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://metaljoe.wordpress.com/?p=234#comment-72</guid>
		<description><![CDATA[Cheers. I would quite like to do something later this year about &quot;Why I want to keep learning Clojure&quot; :-)]]></description>
		<content:encoded><![CDATA[<p>Cheers. I would quite like to do something later this year about &#8220;Why I want to keep learning Clojure&#8221; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
