<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">
<channel>
	<title>Comments for Detronizator.org</title>
	
	<link>http://www.detronizator.org</link>
	<description>«Consider yourself Perfectible makes you Perfect!»</description>
	<lastBuildDate>Tue, 23 Feb 2010 23:07:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CommentsForDetronizatororg" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="commentsfordetronizatororg" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Comment on Serverless chat to reduce office distance by Detro</title>
		<link>http://www.detronizator.org/2010/01/31/serverless-chat-to-reduce-office-distance/comment-page-1/#comment-11641</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Tue, 23 Feb 2010 23:07:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1288#comment-11641</guid>
		<description>Thanks to take the time to post back here Antonio.
I already started to take a look to your post.</description>
		<content:encoded><![CDATA[<p>Thanks to take the time to post back here Antonio.<br />
I already started to take a look to your post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Serverless chat to reduce office distance by ao2</title>
		<link>http://www.detronizator.org/2010/01/31/serverless-chat-to-reduce-office-distance/comment-page-1/#comment-11639</link>
		<dc:creator>ao2</dc:creator>
		<pubDate>Mon, 22 Feb 2010 12:17:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1288#comment-11639</guid>
		<description>Here it is after almost a month:
http://ao2.it/en/blog/2010/02/22/extremely-brief-survey-link-local-xmpp

maybe not exactly what you were expecting Detro, but still...</description>
		<content:encoded><![CDATA[<p>Here it is after almost a month:<br />
<a href="http://ao2.it/en/blog/2010/02/22/extremely-brief-survey-link-local-xmpp" rel="nofollow">http://ao2.it/en/blog/2010/02/22/extremely-brief-survey-link-local-xmpp</a></p>
<p>maybe not exactly what you were expecting Detro, but still&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why iPhone still ruleZ by Vincenzo</title>
		<link>http://www.detronizator.org/2010/02/17/why-iphone-still-rulez/comment-page-1/#comment-11635</link>
		<dc:creator>Vincenzo</dc:creator>
		<pubDate>Thu, 18 Feb 2010 13:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1300#comment-11635</guid>
		<description>least able, sorry</description>
		<content:encoded><![CDATA[<p>least able, sorry</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why iPhone still ruleZ by Detro</title>
		<link>http://www.detronizator.org/2010/02/17/why-iphone-still-rulez/comment-page-1/#comment-11634</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Thu, 18 Feb 2010 13:51:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1300#comment-11634</guid>
		<description>&lt;blockquote&gt;
 My dad is possibly the person least unable to use any piece of technology other than a car stereo from the 80s.
&lt;/blockquote&gt;
Mmm, this means your dad is very good with technology.</description>
		<content:encoded><![CDATA[<blockquote><p>
 My dad is possibly the person least unable to use any piece of technology other than a car stereo from the 80s.
</p></blockquote>
<p>Mmm, this means your dad is very good with technology.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why iPhone still ruleZ by Vincenzo</title>
		<link>http://www.detronizator.org/2010/02/17/why-iphone-still-rulez/comment-page-1/#comment-11633</link>
		<dc:creator>Vincenzo</dc:creator>
		<pubDate>Thu, 18 Feb 2010 12:57:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1300#comment-11633</guid>
		<description>Agreed. Point is, usability for such devices is gold, is a religion, is something that should be put on top of everything. That's why a device like iPhone, despite the lack of some important features, is still the best mobile device ever created on Earth. More than, it is probably the only usable mobile device that deserves that adjective. 

I hated phones, smart-phones, and every other mobile device on the planet in the pre-iPhone era. Completely. I couldn't use any of them. Then, iPhone came. And in the post-iPhone era iPhone is still the only mobile device I can use.

I tried Nexus One three times, in three different situation. And each time I got absurdly upset in less than 30 secs. It does not matter how technically cool, full featured, and bleeding edge it can be. If I can't use it, it's rubbish. 

One more proof about iPhone being the only usable device on Earth, is my father. My dad is possibly the person least unable to use any piece of technology other than a car stereo from the 80s. A few days ago I let him try to use the iPhone: he managed to call, take a photo, and record a video without making the universe collapse. Incredible achievement.</description>
		<content:encoded><![CDATA[<p>Agreed. Point is, usability for such devices is gold, is a religion, is something that should be put on top of everything. That&#8217;s why a device like iPhone, despite the lack of some important features, is still the best mobile device ever created on Earth. More than, it is probably the only usable mobile device that deserves that adjective. </p>
<p>I hated phones, smart-phones, and every other mobile device on the planet in the pre-iPhone era. Completely. I couldn&#8217;t use any of them. Then, iPhone came. And in the post-iPhone era iPhone is still the only mobile device I can use.</p>
<p>I tried Nexus One three times, in three different situation. And each time I got absurdly upset in less than 30 secs. It does not matter how technically cool, full featured, and bleeding edge it can be. If I can&#8217;t use it, it&#8217;s rubbish. </p>
<p>One more proof about iPhone being the only usable device on Earth, is my father. My dad is possibly the person least unable to use any piece of technology other than a car stereo from the 80s. A few days ago I let him try to use the iPhone: he managed to call, take a photo, and record a video without making the universe collapse. Incredible achievement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why iPhone still ruleZ by Detro</title>
		<link>http://www.detronizator.org/2010/02/17/why-iphone-still-rulez/comment-page-1/#comment-11632</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Wed, 17 Feb 2010 09:48:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1300#comment-11632</guid>
		<description>&lt;blockquote&gt;
I would say the most annoying is that when incoming call comes in or sms(calendar) you have to close your application, i would think if Apple would sort this out it will give people much more sense of multi tasking.
&lt;/blockquote&gt;
They should "copy" Android on this. Problem is that iPhone (un)fortunately is not based on a runtime. But this could be worked around using some "message registration and delivery" UDEV-like.

&lt;blockquote&gt;
Plus, i think Push eats up battery in less then 24 hours, which indicates their networking stack is probably not as good as say Nokia, but if they can improve that that is a good way to stay connected. I would also believe some application should be given ability to run in background, for example Pandora or Spotify, but most of the apps or games don’t need to be in background.
&lt;/blockquote&gt;
Agreed 100%: Nokia still has the best Network/Telephony stack hands down. And I believe Apple is going to do something to make "background apps" possible.

The latter will happen, again, when they manage to define an "interaction flow" where the User can understand what's going on. And they have the ability to do it. Hands down ;-) .</description>
		<content:encoded><![CDATA[<blockquote><p>
I would say the most annoying is that when incoming call comes in or sms(calendar) you have to close your application, i would think if Apple would sort this out it will give people much more sense of multi tasking.
</p></blockquote>
<p>They should &#8220;copy&#8221; Android on this. Problem is that iPhone (un)fortunately is not based on a runtime. But this could be worked around using some &#8220;message registration and delivery&#8221; UDEV-like.</p>
<blockquote><p>
Plus, i think Push eats up battery in less then 24 hours, which indicates their networking stack is probably not as good as say Nokia, but if they can improve that that is a good way to stay connected. I would also believe some application should be given ability to run in background, for example Pandora or Spotify, but most of the apps or games don’t need to be in background.
</p></blockquote>
<p>Agreed 100%: Nokia still has the best Network/Telephony stack hands down. And I believe Apple is going to do something to make &#8220;background apps&#8221; possible.</p>
<p>The latter will happen, again, when they manage to define an &#8220;interaction flow&#8221; where the User can understand what&#8217;s going on. And they have the ability to do it. Hands down <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  .</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why iPhone still ruleZ by roman</title>
		<link>http://www.detronizator.org/2010/02/17/why-iphone-still-rulez/comment-page-1/#comment-11631</link>
		<dc:creator>roman</dc:creator>
		<pubDate>Wed, 17 Feb 2010 09:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1300#comment-11631</guid>
		<description>yup, i agree with your post. btw, iPhone OS still much more powerful platform than any other and much easier to code for. Although there may be some limitation, things the users do in everyday life outcomes those.

I would say the most annoying is that when incoming call comes in or sms(calendar) you have to close your application, i would think if Apple would sort this out it will give people much more sense of multi tasking. Plus, i think Push eats up battery in less then 24 hours, which indicates their networking stack is probably not as good as say Nokia, but if they can improve that that is a good way to stay connected. I would also believe some application should be given ability to run in background, for example Pandora or Spotify, but most of the apps or games don't need to be in background.

Apple already improved review process, now it is much faster (a friends free app took only 2 days to appear in appstore), the other things they could improve is have a checklist and some tools they run to be able to run as a developer.

So, iPhone still rulez, and what is so most cool about it as industry has managed to catchup to Apple which is good for average joe, but Apple will be moving forward in a few month setting new finishing lines.</description>
		<content:encoded><![CDATA[<p>yup, i agree with your post. btw, iPhone OS still much more powerful platform than any other and much easier to code for. Although there may be some limitation, things the users do in everyday life outcomes those.</p>
<p>I would say the most annoying is that when incoming call comes in or sms(calendar) you have to close your application, i would think if Apple would sort this out it will give people much more sense of multi tasking. Plus, i think Push eats up battery in less then 24 hours, which indicates their networking stack is probably not as good as say Nokia, but if they can improve that that is a good way to stay connected. I would also believe some application should be given ability to run in background, for example Pandora or Spotify, but most of the apps or games don&#8217;t need to be in background.</p>
<p>Apple already improved review process, now it is much faster (a friends free app took only 2 days to appear in appstore), the other things they could improve is have a checklist and some tools they run to be able to run as a developer.</p>
<p>So, iPhone still rulez, and what is so most cool about it as industry has managed to catchup to Apple which is good for average joe, but Apple will be moving forward in a few month setting new finishing lines.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Serverless chat to reduce office distance by ao2</title>
		<link>http://www.detronizator.org/2010/01/31/serverless-chat-to-reduce-office-distance/comment-page-1/#comment-11571</link>
		<dc:creator>ao2</dc:creator>
		<pubDate>Mon, 01 Feb 2010 09:52:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1288#comment-11571</guid>
		<description>Sure, you can build your own custom system on top of Zeroconf, for fun and to learn stuff, just don't fall in the Not-Invented-Here tunnel. In the end I'd suggest using an already existing solution.

Some IM clients have Link-Local XMPP already: iChat should support it, pidgin (and maybe other libpurple based clients) does, the teleapthy framework used by the GNOME DE also has good support for it. You can even get it to work on MS Windows.

I am collecting some links for the blog post to come. I'll ping you here when it's up.</description>
		<content:encoded><![CDATA[<p>Sure, you can build your own custom system on top of Zeroconf, for fun and to learn stuff, just don&#8217;t fall in the Not-Invented-Here tunnel. In the end I&#8217;d suggest using an already existing solution.</p>
<p>Some IM clients have Link-Local XMPP already: iChat should support it, pidgin (and maybe other libpurple based clients) does, the teleapthy framework used by the GNOME DE also has good support for it. You can even get it to work on MS Windows.</p>
<p>I am collecting some links for the blog post to come. I&#8217;ll ping you here when it&#8217;s up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Serverless chat to reduce office distance by Detro</title>
		<link>http://www.detronizator.org/2010/01/31/serverless-chat-to-reduce-office-distance/comment-page-1/#comment-11570</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Mon, 01 Feb 2010 08:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1288#comment-11570</guid>
		<description>Reading about XMPP in Serverless mode, I see that this kind of usage is a sort of "specially crafted client", where Zeroconf and mDNS is used in conjuction with the XMPP protocol.
But XMPP is solely used for the messaging, so I could mix Zeroconf with something handcrafted for the messaging.

Not sure. I'll try to compile Avahi, that seems to be the most "known and stable" opensource implementation of Zeroconf, and take it from there.</description>
		<content:encoded><![CDATA[<p>Reading about XMPP in Serverless mode, I see that this kind of usage is a sort of &#8220;specially crafted client&#8221;, where Zeroconf and mDNS is used in conjuction with the XMPP protocol.<br />
But XMPP is solely used for the messaging, so I could mix Zeroconf with something handcrafted for the messaging.</p>
<p>Not sure. I&#8217;ll try to compile Avahi, that seems to be the most &#8220;known and stable&#8221; opensource implementation of Zeroconf, and take it from there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Serverless chat to reduce office distance by Detro</title>
		<link>http://www.detronizator.org/2010/01/31/serverless-chat-to-reduce-office-distance/comment-page-1/#comment-11569</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Mon, 01 Feb 2010 00:57:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1288#comment-11569</guid>
		<description>I was sure someone would have had something great to suggest.
Please, Antonio, pass me anything you believe could help me to understand more about what you mentioned.

Thanks a lot.</description>
		<content:encoded><![CDATA[<p>I was sure someone would have had something great to suggest.<br />
Please, Antonio, pass me anything you believe could help me to understand more about what you mentioned.</p>
<p>Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Serverless chat to reduce office distance by ao2</title>
		<link>http://www.detronizator.org/2010/01/31/serverless-chat-to-reduce-office-distance/comment-page-1/#comment-11568</link>
		<dc:creator>ao2</dc:creator>
		<pubDate>Mon, 01 Feb 2010 00:54:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1288#comment-11568</guid>
		<description>Hi Ivan,

no broadcasting needed for actual communication, just relying on  multicast DNS for nodes discovery (Zeroconf, or Bonjour in apple-land) is enough, check out Link-Local XMPP: http://xmpp.org/extensions/xep-0174.html

Since it's XMPP I guess you can use all the cool stuff on top of it, audio and video calls via jingle, end-to-end encryption, and whatnot; I haven't tried such advanced uses tho, I just use it to chat on the lan.

There are already IM clients supporting this; it's curios I've been thinking about blogging just about that lately, maybe I should really do it. Let me know if you need more details.

Take care,
   Antonio</description>
		<content:encoded><![CDATA[<p>Hi Ivan,</p>
<p>no broadcasting needed for actual communication, just relying on  multicast DNS for nodes discovery (Zeroconf, or Bonjour in apple-land) is enough, check out Link-Local XMPP: <a href="http://xmpp.org/extensions/xep-0174.html" rel="nofollow">http://xmpp.org/extensions/xep-0174.html</a></p>
<p>Since it&#8217;s XMPP I guess you can use all the cool stuff on top of it, audio and video calls via jingle, end-to-end encryption, and whatnot; I haven&#8217;t tried such advanced uses tho, I just use it to chat on the lan.</p>
<p>There are already IM clients supporting this; it&#8217;s curios I&#8217;ve been thinking about blogging just about that lately, maybe I should really do it. Let me know if you need more details.</p>
<p>Take care,<br />
   Antonio</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prime Numbers Generator by Vincenzo</title>
		<link>http://www.detronizator.org/2010/01/23/prime-numbers-generator/comment-page-1/#comment-11547</link>
		<dc:creator>Vincenzo</dc:creator>
		<pubDate>Tue, 26 Jan 2010 01:38:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1276#comment-11547</guid>
		<description>Right, ok.
I am not very "awake" right now, but I think the O might be less than n^2.
You should check the &lt;a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes" rel="nofollow"&gt;Sieve of Eratosthenes&lt;/a&gt; out, I believe they share something and the complexity might be similar.</description>
		<content:encoded><![CDATA[<p>Right, ok.<br />
I am not very &#8220;awake&#8221; right now, but I think the O might be less than n^2.<br />
You should check the <a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes" rel="nofollow">Sieve of Eratosthenes</a> out, I believe they share something and the complexity might be similar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prime Numbers Generator by Detro</title>
		<link>http://www.detronizator.org/2010/01/23/prime-numbers-generator/comment-page-1/#comment-11545</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Mon, 25 Jan 2010 18:36:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1276#comment-11545</guid>
		<description>That's what I meant my I expressed my self in a very bad way.

What I should have said is that:
&lt;blockquote&gt;
the complexity is an Ω(n * log(n)) and O(n2).
&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>That&#8217;s what I meant my I expressed my self in a very bad way.</p>
<p>What I should have said is that:</p>
<blockquote><p>
the complexity is an &Omega;(n * log(n)) and O(n2).
</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Prime Numbers Generator by Vincenzo</title>
		<link>http://www.detronizator.org/2010/01/23/prime-numbers-generator/comment-page-1/#comment-11544</link>
		<dc:creator>Vincenzo</dc:creator>
		<pubDate>Mon, 25 Jan 2010 16:04:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1276#comment-11544</guid>
		<description>Ω(n * log(n)) does not exclude O(n^2).
It just means that your function (algorithm) is bounded below by n*log(n) and above by n^2.</description>
		<content:encoded><![CDATA[<p>Ω(n * log(n)) does not exclude O(n^2).<br />
It just means that your function (algorithm) is bounded below by n*log(n) and above by n^2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Money change problem: Greedy vs. Dyn.Pro. by Detro</title>
		<link>http://www.detronizator.org/2010/01/17/money-change-problem-greedy-vs-dyn-pro/comment-page-1/#comment-11511</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Mon, 18 Jan 2010 11:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1245#comment-11511</guid>
		<description>Can't be asked to merge. Let's just leave the comment flow as it is.</description>
		<content:encoded><![CDATA[<p>Can&#8217;t be asked to merge. Let&#8217;s just leave the comment flow as it is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Money change problem: Greedy vs. Dyn.Pro. by Vincenzo</title>
		<link>http://www.detronizator.org/2010/01/17/money-change-problem-greedy-vs-dyn-pro/comment-page-1/#comment-11510</link>
		<dc:creator>Vincenzo</dc:creator>
		<pubDate>Mon, 18 Jan 2010 11:40:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1245#comment-11510</guid>
		<description>Well, merge them, because in the malformed one there is a bit I don't repeat in the good one.

Anyway, resetting the problem by B = A is also wrong, in my pseudo-code, because A never changes. 

Without testing it, I believe A should be updated as well every time a B "is confirmed", which means that this bit


if (2 * D[i] &gt; D[i + 1]) then
// reset the problem
B = A;
S[i+1] = 0
endif


should become


if (2 * D[i] &gt; D[i + 1]) then
// reset the problem
B = A
S[i+1] = 0
else
A = B
endif
</description>
		<content:encoded><![CDATA[<p>Well, merge them, because in the malformed one there is a bit I don&#8217;t repeat in the good one.</p>
<p>Anyway, resetting the problem by B = A is also wrong, in my pseudo-code, because A never changes. </p>
<p>Without testing it, I believe A should be updated as well every time a B &#8220;is confirmed&#8221;, which means that this bit</p>
<p>if (2 * D[i] &gt; D[i + 1]) then<br />
// reset the problem<br />
B = A;<br />
S[i+1] = 0<br />
endif</p>
<p>should become</p>
<p>if (2 * D[i] &gt; D[i + 1]) then<br />
// reset the problem<br />
B = A<br />
S[i+1] = 0<br />
else<br />
A = B<br />
endif</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Money change problem: Greedy vs. Dyn.Pro. by Detro</title>
		<link>http://www.detronizator.org/2010/01/17/money-change-problem-greedy-vs-dyn-pro/comment-page-1/#comment-11509</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Mon, 18 Jan 2010 11:31:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1245#comment-11509</guid>
		<description>You are right. I'm a retard :P
Should I remove your bad-formatted comment?</description>
		<content:encoded><![CDATA[<p>You are right. I&#8217;m a retard <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
Should I remove your bad-formatted comment?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Money change problem: Greedy vs. Dyn.Pro. by Vincenzo</title>
		<link>http://www.detronizator.org/2010/01/17/money-change-problem-greedy-vs-dyn-pro/comment-page-1/#comment-11508</link>
		<dc:creator>Vincenzo</dc:creator>
		<pubDate>Mon, 18 Jan 2010 11:27:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1245#comment-11508</guid>
		<description>Ok, the HTML filters have messed up my previous comment...

Let's try again from "Given the condition above,

2*D[n-2] ≤ 2*D[n-1] 


is true, implying 


2*D[n-1] ≤ D[n] =&gt; 2*D[n-2] ≤ 2*D[n-1] ≤ D[n]


By induction you can verify that valid for every i and j.</description>
		<content:encoded><![CDATA[<p>Ok, the HTML filters have messed up my previous comment&#8230;</p>
<p>Let&#8217;s try again from &#8220;Given the condition above,</p>
<p>2*D[n-2] ≤ 2*D[n-1] </p>
<p>is true, implying </p>
<p>2*D[n-1] ≤ D[n] =&gt; 2*D[n-2] ≤ 2*D[n-1] ≤ D[n]</p>
<p>By induction you can verify that valid for every i and j.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Money change problem: Greedy vs. Dyn.Pro. by Vincenzo</title>
		<link>http://www.detronizator.org/2010/01/17/money-change-problem-greedy-vs-dyn-pro/comment-page-1/#comment-11507</link>
		<dc:creator>Vincenzo</dc:creator>
		<pubDate>Mon, 18 Jan 2010 11:24:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1245#comment-11507</guid>
		<description>The condition is verified for every i and j. I explain why. The array representing the monetary system is ordered from the lowest to highest. 

D[1] &lt; D[2] &lt; ... &lt; D[n-2] &lt; D[n-1] &lt; D[n]

Given the condition above, 

   2*D[n-2]  2*D[n-2] ≤ 2*D[n-1] ≤ D[n]

By induction you can verify that valid for every i and j.</description>
		<content:encoded><![CDATA[<p>The condition is verified for every i and j. I explain why. The array representing the monetary system is ordered from the lowest to highest. </p>
<p>D[1] &lt; D[2] &lt; &#8230; &lt; D[n-2] &lt; D[n-1] &lt; D[n]</p>
<p>Given the condition above, </p>
<p>   2*D[n-2]  2*D[n-2] ≤ 2*D[n-1] ≤ D[n]</p>
<p>By induction you can verify that valid for every i and j.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Money change problem: Greedy vs. Dyn.Pro. by Detro</title>
		<link>http://www.detronizator.org/2010/01/17/money-change-problem-greedy-vs-dyn-pro/comment-page-1/#comment-11506</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Mon, 18 Jan 2010 10:37:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1245#comment-11506</guid>
		<description>I think you are actually right. I have been a bit too "easy" on setting that condition.

One small thing about your algorithm: you check "my" codition only for pairs (i,j), where j = i+1. The condition was for any pair (i,j), where j &gt; i.

But this doesn't change the fact that I was wrong ;)

Thanks for commenting: I'm going to correct the post right now.</description>
		<content:encoded><![CDATA[<p>I think you are actually right. I have been a bit too &#8220;easy&#8221; on setting that condition.</p>
<p>One small thing about your algorithm: you check &#8220;my&#8221; codition only for pairs (i,j), where j = i+1. The condition was for any pair (i,j), where j > i.</p>
<p>But this doesn&#8217;t change the fact that I was wrong <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Thanks for commenting: I&#8217;m going to correct the post right now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Money change problem: Greedy vs. Dyn.Pro. by Vincenzo</title>
		<link>http://www.detronizator.org/2010/01/17/money-change-problem-greedy-vs-dyn-pro/comment-page-1/#comment-11505</link>
		<dc:creator>Vincenzo</dc:creator>
		<pubDate>Mon, 18 Jan 2010 10:29:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1245#comment-11505</guid>
		<description>I was on the train and I was playing with this. 
The condition you mention as responsible to invalidate di Greedy algorithm turns out to be necessary but not sufficient. Indeed, if you use the following input: 

D = {1, 2, 5, 16, 30, 50}
A = 35

which verifies that condition, you can easily check that the Greedy algorithm still works. 

On the other hand, you can easily embed your condition in the Greedy algorithm (see pseudo-code at the bottom of the comment), and make it works in some situations where that condition is verified, as in 

D = {1, 2, 5, 10, 30, 50}
A = 63

Again, being the condition non sufficient, embedding it in the Greedy algorithm is also not sufficient and your DP solution still is the only one being correct (as in "it works in every case"). 

But we can probably find a complementary condition which together with the other one will form a set of condition necessary and sufficient, and therefore the Greedy algorithm can be tweaked accordingly. Not sure, though, that this new potential condition, once implemented, will keep the computational complexity unchanged, as the other one did. 


--- Pseudo Code embedding the condition in Greedy algorithm: 

change_coins_greedy(D[], A):
   init S[n]
   i = n-1
   // Pick as much largest coins as possible
   B = A
   while ( B &gt; 0 ) do:
      // not the first coin being considered and
      // the previous coin has been picked at least once
      if (i  0) then
         // condition to check the monetary system
         if (2 * D[i] &gt; D[i + 1]) then
             // reset the problem
             B = A;
             S[i+1] = 0
         endif
      endif
      S[i] = B / D[i]
      B = B - S[i] * D[i]
      i = i - 1
   endwhile

   // Set to '0' the result for all the other coins
   while ( i &gt;= 0 ) do:
      S[i] = 0
      i = i - 1
   endwhile</description>
		<content:encoded><![CDATA[<p>I was on the train and I was playing with this.<br />
The condition you mention as responsible to invalidate di Greedy algorithm turns out to be necessary but not sufficient. Indeed, if you use the following input: </p>
<p>D = {1, 2, 5, 16, 30, 50}<br />
A = 35</p>
<p>which verifies that condition, you can easily check that the Greedy algorithm still works. </p>
<p>On the other hand, you can easily embed your condition in the Greedy algorithm (see pseudo-code at the bottom of the comment), and make it works in some situations where that condition is verified, as in </p>
<p>D = {1, 2, 5, 10, 30, 50}<br />
A = 63</p>
<p>Again, being the condition non sufficient, embedding it in the Greedy algorithm is also not sufficient and your DP solution still is the only one being correct (as in &#8220;it works in every case&#8221;). </p>
<p>But we can probably find a complementary condition which together with the other one will form a set of condition necessary and sufficient, and therefore the Greedy algorithm can be tweaked accordingly. Not sure, though, that this new potential condition, once implemented, will keep the computational complexity unchanged, as the other one did. </p>
<p>&#8212; Pseudo Code embedding the condition in Greedy algorithm: </p>
<p>change_coins_greedy(D[], A):<br />
   init S[n]<br />
   i = n-1<br />
   // Pick as much largest coins as possible<br />
   B = A<br />
   while ( B &gt; 0 ) do:<br />
      // not the first coin being considered and<br />
      // the previous coin has been picked at least once<br />
      if (i  0) then<br />
         // condition to check the monetary system<br />
         if (2 * D[i] &gt; D[i + 1]) then<br />
             // reset the problem<br />
             B = A;<br />
             S[i+1] = 0<br />
         endif<br />
      endif<br />
      S[i] = B / D[i]<br />
      B = B &#8211; S[i] * D[i]<br />
      i = i &#8211; 1<br />
   endwhile</p>
<p>   // Set to &#8216;0&#8242; the result for all the other coins<br />
   while ( i &gt;= 0 ) do:<br />
      S[i] = 0<br />
      i = i &#8211; 1<br />
   endwhile</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Git-over-SSH through Socks 5 Proxy on Windows by Detro</title>
		<link>http://www.detronizator.org/2009/08/13/git-over-ssh-through-socks-5-proxy-on-windows/comment-page-1/#comment-11483</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Fri, 15 Jan 2010 08:37:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1113#comment-11483</guid>
		<description>I use those scripts on Windows-msysgit myself: I have every script in &lt;code&gt;"/c/bin/"&lt;/code&gt;. It works as long as msysgit doesn't have a bug.

And in the last 2/3 months happened at least once that in, an update, the msysgit guys screwed the configuration. So, it's not always something we can workaround.

Anyway, no prob ;)</description>
		<content:encoded><![CDATA[<p>I use those scripts on Windows-msysgit myself: I have every script in <code>"/c/bin/"</code>. It works as long as msysgit doesn&#8217;t have a bug.</p>
<p>And in the last 2/3 months happened at least once that in, an update, the msysgit guys screwed the configuration. So, it&#8217;s not always something we can workaround.</p>
<p>Anyway, no prob <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculate abs(int) without branching by Detro</title>
		<link>http://www.detronizator.org/2010/01/13/calculate-absint-without-branching/comment-page-1/#comment-11482</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Fri, 15 Jan 2010 08:29:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1235#comment-11482</guid>
		<description>I should have said "what was the reason for avoiding branching and which kind of branching in particular".

You are right: Branch and Condition are not the same thing. But I'm NOT assembly-oriented enough to remember to do the difference up-front. :P</description>
		<content:encoded><![CDATA[<p>I should have said &#8220;what was the reason for avoiding branching and which kind of branching in particular&#8221;.</p>
<p>You are right: Branch and Condition are not the same thing. But I&#8217;m NOT assembly-oriented enough to remember to do the difference up-front. <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Git-over-SSH through Socks 5 Proxy on Windows by JSLin</title>
		<link>http://www.detronizator.org/2009/08/13/git-over-ssh-through-socks-5-proxy-on-windows/comment-page-1/#comment-11481</link>
		<dc:creator>JSLin</dc:creator>
		<pubDate>Fri, 15 Jan 2010 08:26:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1113#comment-11481</guid>
		<description>Wow, I finally found this after a few hours of intensive search. Although the enable_socks5_proxy_for_git.sh didn't work for me for some reason, but if I export the global vars manually with the other two scripts, it runs pretty well. Originally I tried many many times with some examples that could run on *nix system (like the one on github about "how to transparently clone from github with ssh tunnel"), I just can't figure out how to adapt that on msysgit environment.

Your post definitely saved my day! Many Thanks.</description>
		<content:encoded><![CDATA[<p>Wow, I finally found this after a few hours of intensive search. Although the enable_socks5_proxy_for_git.sh didn&#8217;t work for me for some reason, but if I export the global vars manually with the other two scripts, it runs pretty well. Originally I tried many many times with some examples that could run on *nix system (like the one on github about &#8220;how to transparently clone from github with ssh tunnel&#8221;), I just can&#8217;t figure out how to adapt that on msysgit environment.</p>
<p>Your post definitely saved my day! Many Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculate abs(int) without branching by ao2</title>
		<link>http://www.detronizator.org/2010/01/13/calculate-absint-without-branching/comment-page-1/#comment-11477</link>
		<dc:creator>ao2</dc:creator>
		<pubDate>Thu, 14 Jan 2010 21:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1235#comment-11477</guid>
		<description>Yes, you're perfectly right, I was just playing p[r]icky with the definition of “branch instructions”, the smiley be my witness.

Just for completeness an UNCONDITIONAL JUMP, is also called UNCONDITIONAL BRANCH sometimes. For some, branch and condition are not the same thing. Abuse of language? Maybe, but it was &lt;em&gt;functional&lt;/em&gt; to my joke, if nothing else (oh, it's raining puns...).

All the best, Antonio.</description>
		<content:encoded><![CDATA[<p>Yes, you&#8217;re perfectly right, I was just playing p[r]icky with the definition of “branch instructions”, the smiley be my witness.</p>
<p>Just for completeness an UNCONDITIONAL JUMP, is also called UNCONDITIONAL BRANCH sometimes. For some, branch and condition are not the same thing. Abuse of language? Maybe, but it was <em>functional</em> to my joke, if nothing else (oh, it&#8217;s raining puns&#8230;).</p>
<p>All the best, Antonio.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Swap the value of two integers without temporary storage by Detro</title>
		<link>http://www.detronizator.org/2010/01/13/swap-the-value-of-two-integers-without-temporary-storage/comment-page-1/#comment-11475</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Thu, 14 Jan 2010 17:20:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1156#comment-11475</guid>
		<description>Yes, but I think this can suffer of overflow if "a" or "b" are too big.

But very nice indeed.</description>
		<content:encoded><![CDATA[<p>Yes, but I think this can suffer of overflow if &#8220;a&#8221; or &#8220;b&#8221; are too big.</p>
<p>But very nice indeed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Swap the value of two integers without temporary storage by Mike Jennings</title>
		<link>http://www.detronizator.org/2010/01/13/swap-the-value-of-two-integers-without-temporary-storage/comment-page-1/#comment-11474</link>
		<dc:creator>Mike Jennings</dc:creator>
		<pubDate>Thu, 14 Jan 2010 16:49:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1156#comment-11474</guid>
		<description>What about:

a+=b;
b=a-b;
a-=b;

Or just for fun:
a*=b;
b=a/b;
a/=b;

But of course, you would never use * and / this way ;)</description>
		<content:encoded><![CDATA[<p>What about:</p>
<p>a+=b;<br />
b=a-b;<br />
a-=b;</p>
<p>Or just for fun:<br />
a*=b;<br />
b=a/b;<br />
a/=b;</p>
<p>But of course, you would never use * and / this way <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculate abs(int) without branching by Detro</title>
		<link>http://www.detronizator.org/2010/01/13/calculate-absint-without-branching/comment-page-1/#comment-11473</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Thu, 14 Jan 2010 15:45:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1235#comment-11473</guid>
		<description>You go really deep technical for my taste with this, but I can easily recall that JMP is an UNCONDITIONAL JUMP.

This means that no CONDITION is verified, and the Pipeline can keep prefetching.

I forgot to say that this was the MAIN reason for avoiding branching :P</description>
		<content:encoded><![CDATA[<p>You go really deep technical for my taste with this, but I can easily recall that JMP is an UNCONDITIONAL JUMP.</p>
<p>This means that no CONDITION is verified, and the Pipeline can keep prefetching.</p>
<p>I forgot to say that this was the MAIN reason for avoiding branching <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calculate abs(int) without branching by ao2</title>
		<link>http://www.detronizator.org/2010/01/13/calculate-absint-without-branching/comment-page-1/#comment-11471</link>
		<dc:creator>ao2</dc:creator>
		<pubDate>Thu, 14 Jan 2010 13:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1235#comment-11471</guid>
		<description>A JMP is still a branch instruction, tho. :P

Well, sorry for such a bad joke, the compiler is going to optimize that function out, and this was not even the point anyways :)

I just wanted to say: go on with these posts, some memory refreshing is always good.</description>
		<content:encoded><![CDATA[<p>A JMP is still a branch instruction, tho. <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Well, sorry for such a bad joke, the compiler is going to optimize that function out, and this was not even the point anyways <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I just wanted to say: go on with these posts, some memory refreshing is always good.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on String search in O(n + m) by Detro</title>
		<link>http://www.detronizator.org/2010/01/08/string-search-in-on-m/comment-page-1/#comment-11398</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Fri, 08 Jan 2010 16:49:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1216#comment-11398</guid>
		<description>Thanks Jordan ;)</description>
		<content:encoded><![CDATA[<p>Thanks Jordan <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on String search in O(n + m) by Jordan</title>
		<link>http://www.detronizator.org/2010/01/08/string-search-in-on-m/comment-page-1/#comment-11397</link>
		<dc:creator>Jordan</dc:creator>
		<pubDate>Fri, 08 Jan 2010 16:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1216#comment-11397</guid>
		<description>A good explanation of the problem, the algorithm, and the solution. Appreciate the post!</description>
		<content:encoded><![CDATA[<p>A good explanation of the problem, the algorithm, and the solution. Appreciate the post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Count bits set in parallel by Detro</title>
		<link>http://www.detronizator.org/2010/01/07/count-bits-set-in-parallel/comment-page-1/#comment-11390</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Thu, 07 Jan 2010 16:17:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1206#comment-11390</guid>
		<description>@ao2: Ciao Fra', come va?
Indeed, I think that approaches like the last one are not for "normal people", but all my respect to the ones that are able to come out with stuff like that, and live as normal human being on Earth :P</description>
		<content:encoded><![CDATA[<p>@ao2: Ciao Fra&#8217;, come va?<br />
Indeed, I think that approaches like the last one are not for &#8220;normal people&#8221;, but all my respect to the ones that are able to come out with stuff like that, and live as normal human being on Earth <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Count bits set in parallel by ao2</title>
		<link>http://www.detronizator.org/2010/01/07/count-bits-set-in-parallel/comment-page-1/#comment-11389</link>
		<dc:creator>ao2</dc:creator>
		<pubDate>Thu, 07 Jan 2010 16:09:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1206#comment-11389</guid>
		<description>Hi Detro,

I've run into code like this in &lt;a href="http://lxr.linux.no/#linux+v2.6.32/lib/hweight.c" rel="nofollow"&gt;linux&lt;/a&gt; once, you find another explanation on &lt;a title="Wikipedia: Hamming weight" href="http://en.wikipedia.org/wiki/Hamming_weight" rel="nofollow"&gt;Hamming weight page on Wikipedia&lt;/a&gt;.

Bit-hacks are often damping indeed :) I felt so stupid when reading &lt;a href="http://graphics.stanford.edu/~seander/bithacks.html" rel="nofollow"&gt;Bit Twiddling Hacks &lt;/a&gt;... but then I realized that maybe, in this context, "stupid" just translates to "sane"...</description>
		<content:encoded><![CDATA[<p>Hi Detro,</p>
<p>I&#8217;ve run into code like this in <a href="http://lxr.linux.no/#linux+v2.6.32/lib/hweight.c" rel="nofollow">linux</a> once, you find another explanation on <a title="Wikipedia: Hamming weight" href="http://en.wikipedia.org/wiki/Hamming_weight" rel="nofollow">Hamming weight page on Wikipedia</a>.</p>
<p>Bit-hacks are often damping indeed <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I felt so stupid when reading <a href="http://graphics.stanford.edu/~seander/bithacks.html" rel="nofollow">Bit Twiddling Hacks </a>&#8230; but then I realized that maybe, in this context, &#8220;stupid&#8221; just translates to &#8220;sane&#8221;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Siti web multipli senza VHOSTs by Detro</title>
		<link>http://www.detronizator.org/outputs/howtos/siti-web-multipli-senza-vhosts/comment-page-1/#comment-11319</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Mon, 04 Jan 2010 15:46:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/outputs/creare-siti-web-multipli-senza-vhosts/#comment-11319</guid>
		<description>Onestamente ho abbandonato Tophost da 2 anni quasi e ne sono contento.
Non saprei proprio come risolvere il tuo problema: di sicuro deve essere il DNS maintainer a fornirti il servizio del wildcard DNS.

Ciao</description>
		<content:encoded><![CDATA[<p>Onestamente ho abbandonato Tophost da 2 anni quasi e ne sono contento.<br />
Non saprei proprio come risolvere il tuo problema: di sicuro deve essere il DNS maintainer a fornirti il servizio del wildcard DNS.</p>
<p>Ciao</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Siti web multipli senza VHOSTs by Dario</title>
		<link>http://www.detronizator.org/outputs/howtos/siti-web-multipli-senza-vhosts/comment-page-1/#comment-11317</link>
		<dc:creator>Dario</dc:creator>
		<pubDate>Mon, 04 Jan 2010 15:11:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/outputs/creare-siti-web-multipli-senza-vhosts/#comment-11317</guid>
		<description>Ciao, anche io giro su Tophost.... C'è la possibilità di far creare ad un utente un suo sottodominio in automatico senza che io intervenga in maniera manuale?
Ho letto che serve il wildcard dns.... Tophost lo fornisce questo servizio? Ho aperto un ticket con il supporto tophost ma non mi hanno ancora risposto... Se così non fosse, esiste qualche script che possa intervenire in tal senso?</description>
		<content:encoded><![CDATA[<p>Ciao, anche io giro su Tophost&#8230;. C&#8217;è la possibilità di far creare ad un utente un suo sottodominio in automatico senza che io intervenga in maniera manuale?<br />
Ho letto che serve il wildcard dns&#8230;. Tophost lo fornisce questo servizio? Ho aperto un ticket con il supporto tophost ma non mi hanno ancora risposto&#8230; Se così non fosse, esiste qualche script che possa intervenire in tal senso?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Find the non repeating char in O(n) time and O(1) space – v2 by Detro</title>
		<link>http://www.detronizator.org/2009/12/18/find-the-non-repeating-char-in-on-time-and-o1-space-v2/comment-page-1/#comment-11190</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Wed, 23 Dec 2009 10:14:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1145#comment-11190</guid>
		<description>About your first point, what I mean is if we initialize the array to "1", every char will result already marked as "present once". I assume you maintain the convention I set. Unless, then, you are changing it somehow, using:
&lt;ul&gt;
&lt;li&gt;0x1 as "never appeared"&lt;/li&gt;
&lt;li&gt;0x2 as "appeared once"&lt;/li&gt;
&lt;li&gt;0x4 (or, in general, &gt; 0x2) as "appeared multiple times"&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;

About the second point, I guess you are right: it is something dependent on the platform: if there is a specific set of registry already able to do 1-clock-heartbit AND and none for "EQUALITY COMPARISON", then my point stands. Otherwise it's irrelevant.
I'm unable to find a reference, but I was told looooong time ago that this was the case for ARM architectures. But, again, I could be wrong.

Any Architecture expert out there? ;)

BUT, there is still a reason for NOT using the EQUALITY COMPARISON: given the fact that the algorithm is all designed around the concept of "bit manipulation", it is more clear, in my opinion, to maintain constant the usage of bitwise operators. Avoids, for who reads the algorithm, to move from the mental scope of "bitwise operations" to "interger's math".

Thank you very much for this comments anyway, really really useful to compare with someone else that knows these matters ;)&lt;/ul&gt;</description>
		<content:encoded><![CDATA[<p>About your first point, what I mean is if we initialize the array to &#8220;1&#8243;, every char will result already marked as &#8220;present once&#8221;. I assume you maintain the convention I set. Unless, then, you are changing it somehow, using:</p>
<ul>
<li>0&#215;1 as &#8220;never appeared&#8221;</li>
<li>0&#215;2 as &#8220;appeared once&#8221;</li>
<li>0&#215;4 (or, in general, > 0&#215;2) as &#8220;appeared multiple times&#8221;</li>
</ul>
<ul>
<p>About the second point, I guess you are right: it is something dependent on the platform: if there is a specific set of registry already able to do 1-clock-heartbit AND and none for &#8220;EQUALITY COMPARISON&#8221;, then my point stands. Otherwise it&#8217;s irrelevant.<br />
I&#8217;m unable to find a reference, but I was told looooong time ago that this was the case for ARM architectures. But, again, I could be wrong.</p>
<p>Any Architecture expert out there? <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>BUT, there is still a reason for NOT using the EQUALITY COMPARISON: given the fact that the algorithm is all designed around the concept of &#8220;bit manipulation&#8221;, it is more clear, in my opinion, to maintain constant the usage of bitwise operators. Avoids, for who reads the algorithm, to move from the mental scope of &#8220;bitwise operations&#8221; to &#8220;interger&#8217;s math&#8221;.</p>
<p>Thank you very much for this comments anyway, really really useful to compare with someone else that knows these matters <img src='http://www.detronizator.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </ul>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Find the non repeating char in O(n) time and O(1) space – v2 by V.R.</title>
		<link>http://www.detronizator.org/2009/12/18/find-the-non-repeating-char-in-on-time-and-o1-space-v2/comment-page-1/#comment-11180</link>
		<dc:creator>V.R.</dc:creator>
		<pubDate>Tue, 22 Dec 2009 13:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1145#comment-11180</guid>
		<description>Yes, I know about memset. It has to be 1 (i.e. non zero) because shifting 0 is 0. It's not really “marking all chars as present once”, but checking if it has been shifted once.

Your second point is interesting, can you give any references? Probably specific to platform/compiler.</description>
		<content:encoded><![CDATA[<p>Yes, I know about memset. It has to be 1 (i.e. non zero) because shifting 0 is 0. It&#8217;s not really “marking all chars as present once”, but checking if it has been shifted once.</p>
<p>Your second point is interesting, can you give any references? Probably specific to platform/compiler.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Find the non repeating char in O(n) time and O(1) space – v2 by Detro</title>
		<link>http://www.detronizator.org/2009/12/18/find-the-non-repeating-char-in-on-time-and-o1-space-v2/comment-page-1/#comment-11168</link>
		<dc:creator>Detro</dc:creator>
		<pubDate>Mon, 21 Dec 2009 00:08:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1145#comment-11168</guid>
		<description>@V.R.:
Your first suggestion is cool: yes, it will make the if even slimmer.

About your second suggestion, I think you should check this out: http://www.cplusplus.com/reference/clibrary/cstring/memset/. The second parameter represent the initialization value: doing like you say would mean "marking all chars as present once".

And, for your last suggestion, a "bitwise AND" is faster then using comparison. That's why it should be used whenever possible.

Thanks.</description>
		<content:encoded><![CDATA[<p>@V.R.:<br />
Your first suggestion is cool: yes, it will make the if even slimmer.</p>
<p>About your second suggestion, I think you should check this out: <a href="http://www.cplusplus.com/reference/clibrary/cstring/memset/" rel="nofollow">http://www.cplusplus.com/reference/clibrary/cstring/memset/</a>. The second parameter represent the initialization value: doing like you say would mean &#8220;marking all chars as present once&#8221;.</p>
<p>And, for your last suggestion, a &#8220;bitwise AND&#8221; is faster then using comparison. That&#8217;s why it should be used whenever possible.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Find the non repeating char in O(n) time and O(1) space – v2 by V.R.</title>
		<link>http://www.detronizator.org/2009/12/18/find-the-non-repeating-char-in-on-time-and-o1-space-v2/comment-page-1/#comment-11166</link>
		<dc:creator>V.R.</dc:creator>
		<pubDate>Sun, 20 Dec 2009 20:01:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1145#comment-11166</guid>
		<description>Why not replace all the if stuff in the middle with:
&lt;code&gt;
char_presence_bitmask[NORMALIZE_CHAR(input[i])]  &lt;&lt;= 1;
&lt;/code&gt;
Change the memset to:
&lt;code&gt;
memset(char_presence_bitmask, 1, 26);
&lt;/code&gt;
And check in the last for loop if it equals 2? Time/space complexity is the same, but will it not run faster than with the jumps?</description>
		<content:encoded><![CDATA[<p>Why not replace all the if stuff in the middle with:<br />
<code><br />
char_presence_bitmask[NORMALIZE_CHAR(input[i])]  &lt;&lt;= 1;<br />
</code><br />
Change the memset to:<br />
<code><br />
memset(char_presence_bitmask, 1, 26);<br />
</code><br />
And check in the last for loop if it equals 2? Time/space complexity is the same, but will it not run faster than with the jumps?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Find the non repeating char in O(n) time and O(1) space by Find the non repeating char in O(n) time and O(1) space – v2 at Detronizator.org</title>
		<link>http://www.detronizator.org/2009/12/13/find-the-non-repeating-char-in-on-time-and-o1-space/comment-page-1/#comment-11161</link>
		<dc:creator>Find the non repeating char in O(n) time and O(1) space – v2 at Detronizator.org</dc:creator>
		<pubDate>Sat, 19 Dec 2009 10:48:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.detronizator.org/?p=1125#comment-11161</guid>
		<description>[...] colleague and friend Luca (@lucabox) described a better solution to the problem of “Finding the first non repearing char in a string in O(n) time and O(1) space“. It uses smartly the space, making the solution nicer and slicker. Or we are just 2 geeks [...]</description>
		<content:encoded><![CDATA[<p>[...] colleague and friend Luca (@lucabox) described a better solution to the problem of &#8220;Finding the first non repearing char in a string in O(n) time and O(1) space&#8220;. It uses smartly the space, making the solution nicer and slicker. Or we are just 2 geeks [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
