<?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 Molecular Musings</title>
	<atom:link href="http://molecularmusings.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://molecularmusings.wordpress.com</link>
	<description>Development blog of the Molecule Engine</description>
	<lastBuildDate>Sat, 25 May 2013 03:10:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on A faster quaternion-vector multiplication by Understanding quaternions &#124; Light is beautiful</title>
		<link>http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/#comment-784</link>
		<dc:creator><![CDATA[Understanding quaternions &#124; Light is beautiful]]></dc:creator>
		<pubDate>Sat, 25 May 2013 03:10:26 +0000</pubDate>
		<guid isPermaLink="false">http://molecularmusings.wordpress.com/?p=451#comment-784</guid>
		<description><![CDATA[[&#8230;] Update: on a side note, here is a trick for faster quaternion &#8211; vector multiplication. [&#8230;]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] Update: on a side note, here is a trick for faster quaternion &#8211; vector multiplication. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adventures in data-oriented design &#8211; Part 2: Hierarchical data by A faster quaternion-vector multiplication &#124; Molecular Musings</title>
		<link>http://molecularmusings.wordpress.com/2013/02/22/adventures-in-data-oriented-design-part-2-hierarchical-data/#comment-783</link>
		<dc:creator><![CDATA[A faster quaternion-vector multiplication &#124; Molecular Musings]]></dc:creator>
		<pubDate>Fri, 24 May 2013 12:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://molecularmusings.wordpress.com/?p=424#comment-783</guid>
		<description><![CDATA[[&#8230;] When building the global pose of a skeleton from its local pose, as discussed in this blog post. [&#8230;]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] When building the global pose of a skeleton from its local pose, as discussed in this blog post. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Singleton is an anti-pattern by Iván Vodopiviz</title>
		<link>http://molecularmusings.wordpress.com/2011/11/11/singleton-is-an-anti-pattern/#comment-781</link>
		<dc:creator><![CDATA[Iván Vodopiviz]]></dc:creator>
		<pubDate>Wed, 22 May 2013 17:05:59 +0000</pubDate>
		<guid isPermaLink="false">http://molecularmusings.wordpress.com/?p=223#comment-781</guid>
		<description><![CDATA[This. I know I&#039;ve done it more than once because of these reasons. It doesn&#039;t make me proud and I&#039;ve never done this kind of stuff on big projects (most of those already came with their own atrocious devices like factories from hell), but for smaller stuff I must confess I used some singletons here and there.]]></description>
		<content:encoded><![CDATA[<p>This. I know I&#8217;ve done it more than once because of these reasons. It doesn&#8217;t make me proud and I&#8217;ve never done this kind of stuff on big projects (most of those already came with their own atrocious devices like factories from hell), but for smaller stuff I must confess I used some singletons here and there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adventures in data-oriented design &#8211; Part 3a: Ownership by Adventures in data-oriented design &#8211; Part 3b: Internal References &#124; Molecular Musings</title>
		<link>http://molecularmusings.wordpress.com/2013/05/02/adventures-in-data-oriented-design-part-3a-ownership/#comment-780</link>
		<dc:creator><![CDATA[Adventures in data-oriented design &#8211; Part 3b: Internal References &#124; Molecular Musings]]></dc:creator>
		<pubDate>Fri, 17 May 2013 13:53:50 +0000</pubDate>
		<guid isPermaLink="false">http://molecularmusings.wordpress.com/?p=434#comment-780</guid>
		<description><![CDATA[[&#8230;] &#8592; Previous [&#8230;]]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] &larr; Previous [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Building a load-balanced task scheduler &#8211; Part 3: Parent-child relationships by Stefan Reinalter</title>
		<link>http://molecularmusings.wordpress.com/2012/04/25/building-a-load-balanced-task-scheduler-part-3-parent-child-relationships/#comment-778</link>
		<dc:creator><![CDATA[Stefan Reinalter]]></dc:creator>
		<pubDate>Wed, 15 May 2013 12:28:08 +0000</pubDate>
		<guid isPermaLink="false">http://molecularmusings.wordpress.com/?p=292#comment-778</guid>
		<description><![CDATA[No, you didn&#039;t miss anything. Quite the opposite!
How such situations are handled depends a bit on how HelpWithWork() (and GetAvailableTask()) are implemented. GetAvailableTask() could be implemented so that it only returns tasks which can be run &lt;strong&gt;right now&lt;/strong&gt;.

In my implementation, I actually have an additional queue of what I call &lt;em&gt;open tasks&lt;/em&gt;. Whenever a task gets queued which cannot be run immediately (because it has dependencies or other child tasks), it gets added to this queue. Other tasks are run right away. Additionally, Work() is modified so that after a task has been worked upon, the thread tries to queue any of the open tasks, because they might now be able to run. Furthermore, while waiting on a task to be finished, the thread also tries to queue any of the open tasks.

This automatically handles the situation you described. There must always be a thread who pulls the last remaining, open task from the queue, even if it&#039;s maybe the one and only task all others depend upon. As soon as that thread has finished working on that task, all the others will be able to run automatically.]]></description>
		<content:encoded><![CDATA[<p>No, you didn&#8217;t miss anything. Quite the opposite!<br />
How such situations are handled depends a bit on how HelpWithWork() (and GetAvailableTask()) are implemented. GetAvailableTask() could be implemented so that it only returns tasks which can be run <strong>right now</strong>.</p>
<p>In my implementation, I actually have an additional queue of what I call <em>open tasks</em>. Whenever a task gets queued which cannot be run immediately (because it has dependencies or other child tasks), it gets added to this queue. Other tasks are run right away. Additionally, Work() is modified so that after a task has been worked upon, the thread tries to queue any of the open tasks, because they might now be able to run. Furthermore, while waiting on a task to be finished, the thread also tries to queue any of the open tasks.</p>
<p>This automatically handles the situation you described. There must always be a thread who pulls the last remaining, open task from the queue, even if it&#8217;s maybe the one and only task all others depend upon. As soon as that thread has finished working on that task, all the others will be able to run automatically.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Building a load-balanced task scheduler &#8211; Part 3: Parent-child relationships by bben86</title>
		<link>http://molecularmusings.wordpress.com/2012/04/25/building-a-load-balanced-task-scheduler-part-3-parent-child-relationships/#comment-777</link>
		<dc:creator><![CDATA[bben86]]></dc:creator>
		<pubDate>Wed, 15 May 2013 12:03:36 +0000</pubDate>
		<guid isPermaLink="false">http://molecularmusings.wordpress.com/?p=292#comment-777</guid>
		<description><![CDATA[Say that A is the parent of B, which is in turn the parent of C.  Is it possible that WorkOnTask is issued with tasks B.  Finding that it isn&#039;t ready, it calls HelpWithWork.  HelpWithWork pulls A from the queue and calls WorkOnTask with A.  Again, finding that it isn&#039;t ready, it calls HelpWithWork once more.  This time HelpWithWork pulls C from the queue.  The subsequent call to WorkOnTask is able to complete C.  It then returns to the most recent WorkOnTask, which is handling A.  A is not finished because B is not finished.  B has already been pulled out of the queue, but can&#039;t be worked on until the WorkOnTask handling A has returned.

Is this an unforseen problem?  Or have I missed something that would prevent this from happening?]]></description>
		<content:encoded><![CDATA[<p>Say that A is the parent of B, which is in turn the parent of C.  Is it possible that WorkOnTask is issued with tasks B.  Finding that it isn&#8217;t ready, it calls HelpWithWork.  HelpWithWork pulls A from the queue and calls WorkOnTask with A.  Again, finding that it isn&#8217;t ready, it calls HelpWithWork once more.  This time HelpWithWork pulls C from the queue.  The subsequent call to WorkOnTask is able to complete C.  It then returns to the most recent WorkOnTask, which is handling A.  A is not finished because B is not finished.  B has already been pulled out of the queue, but can&#8217;t be worked on until the WorkOnTask handling A has returned.</p>
<p>Is this an unforseen problem?  Or have I missed something that would prevent this from happening?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Properly handling keyboard input by Michael</title>
		<link>http://molecularmusings.wordpress.com/2011/09/05/properly-handling-keyboard-input/#comment-776</link>
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Mon, 13 May 2013 15:25:28 +0000</pubDate>
		<guid isPermaLink="false">http://molecularmusings.wordpress.com/?p=143#comment-776</guid>
		<description><![CDATA[Regarding AltGr, see also the VirtualBox source: https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp#L385]]></description>
		<content:encoded><![CDATA[<p>Regarding AltGr, see also the VirtualBox source: <a href="https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp#L385" rel="nofollow">https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp#L385</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Designing extensible, modular classes by Christian Ondracek</title>
		<link>http://molecularmusings.wordpress.com/2011/06/29/designing-extensible-modular-classes/#comment-775</link>
		<dc:creator><![CDATA[Christian Ondracek]]></dc:creator>
		<pubDate>Sun, 12 May 2013 17:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://molecularmusings.wordpress.com/?p=66#comment-775</guid>
		<description><![CDATA[Thanks for the quick answer.
I actually already thought about that but somehow discarded the idea because I was still a little focused on my old design. Thanks for clarification :)]]></description>
		<content:encoded><![CDATA[<p>Thanks for the quick answer.<br />
I actually already thought about that but somehow discarded the idea because I was still a little focused on my old design. Thanks for clarification <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Designing extensible, modular classes by Stefan Reinalter</title>
		<link>http://molecularmusings.wordpress.com/2011/06/29/designing-extensible-modular-classes/#comment-774</link>
		<dc:creator><![CDATA[Stefan Reinalter]]></dc:creator>
		<pubDate>Sun, 12 May 2013 16:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://molecularmusings.wordpress.com/?p=66#comment-774</guid>
		<description><![CDATA[The solution is quite simple: in your case, why not pass the channel value which is to be filtered against explicitly in the constructor?
For example, you could take each of the policies by const-ref. in the Logger constructor. This allows you to pass whatever values you want to each of the policies, e.g.:

SomeLoggerClass myLogger(SomeOutputPolicy(arg1, arg2), ChannelFilter(channelToBeShown), OtherPolicy(arg1, arg2, arg3));

That&#039;s how I do it in order to pass arguments to policies in all policy-based classes.]]></description>
		<content:encoded><![CDATA[<p>The solution is quite simple: in your case, why not pass the channel value which is to be filtered against explicitly in the constructor?<br />
For example, you could take each of the policies by const-ref. in the Logger constructor. This allows you to pass whatever values you want to each of the policies, e.g.:</p>
<p>SomeLoggerClass myLogger(SomeOutputPolicy(arg1, arg2), ChannelFilter(channelToBeShown), OtherPolicy(arg1, arg2, arg3));</p>
<p>That&#8217;s how I do it in order to pass arguments to policies in all policy-based classes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Designing extensible, modular classes by Christian Ondracek</title>
		<link>http://molecularmusings.wordpress.com/2011/06/29/designing-extensible-modular-classes/#comment-772</link>
		<dc:creator><![CDATA[Christian Ondracek]]></dc:creator>
		<pubDate>Fri, 10 May 2013 18:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://molecularmusings.wordpress.com/?p=66#comment-772</guid>
		<description><![CDATA[Hello Stefan,

I recently started refactoring and overdoing a little logging and debugging framework I did once and just came accross your article. I always wanted to get started with policy based design and overdoing my old logging class based on your approach seems to be a good start for me.

Currently I´m kinda stuck with an architectural problem related to filtering. 
If I understood correctly the Criteria struct takes care of storing all related data for filtering (in addition to the formatting data) like the verbose mode, log level, channel etc. 
Now in case of the VerbosityFilter, i would implement the filter method like this for example:
&lt;code&gt;struct FilterCriteria {
			FilterCriteria() : channel(UNDEFINED), loglevel(UNDEFINED), verbosity(UNDEFINED) {}

			uint32_t channel;
			uint32_t loglevel;
			uint32_t verbosity;
		};

struct LogLevelFilter {
			bool filter(const FilterCriteria&amp; criteria) {
				if(criteria.loglevel == UNDEFINED &#124;&#124; criteria.verbosity == UNDEFINED) {
					return false;
				} else if(criteria.loglevel &gt;= criteria.verbosity) {
					return true;
				} else {
					return false;
				}
			}
		};&lt;/code&gt;

The verbosity level would be somewhere defined in the code and every time I log something I pass the defined verbosity level to the log() method from the logger. So if if have some static variable or define called VERBOSITY, I would always pass VERBOSITY to log und depending on VERBOSITY and the log level for each log, the log message is displayed or not.

Now coming to the Channelfilter I´m not sure how i should define the channel i want to filter within my Filter.
I dont want to add a channel() method within my logger since only Loggers with the Channerfilter policy are interested in the channel.
I also dont want to do something like this
&lt;code&gt;
struct LogSettings  {
			static uint32_t verbosity;
			static uint32_t channel;
		};
struct ChannelFilter {
			bool filter(const FilterCriteria&amp; criteria) {
				if(criteria.channel == UNDEFINED) {
					return false;
				} else if(criteria.channel == LogSettings::channel) {
					return true;
				} else {
					return false;
				}
			}
		};
&lt;/code&gt;
because all loggers would be bound to the LogSettings struct and I cannot tell Logger a to only filter by Channel &quot;A&quot; and Logger b to only filter by Channel &quot;B&quot;. This problem does not came into play with verbosity since the verbosity level can be shared by all loggers.

I hope i could state a clear question.

Regards Christian]]></description>
		<content:encoded><![CDATA[<p>Hello Stefan,</p>
<p>I recently started refactoring and overdoing a little logging and debugging framework I did once and just came accross your article. I always wanted to get started with policy based design and overdoing my old logging class based on your approach seems to be a good start for me.</p>
<p>Currently I´m kinda stuck with an architectural problem related to filtering.<br />
If I understood correctly the Criteria struct takes care of storing all related data for filtering (in addition to the formatting data) like the verbose mode, log level, channel etc.<br />
Now in case of the VerbosityFilter, i would implement the filter method like this for example:<br />
<code>struct FilterCriteria {<br />
			FilterCriteria() : channel(UNDEFINED), loglevel(UNDEFINED), verbosity(UNDEFINED) {}</p>
<p>			uint32_t channel;<br />
			uint32_t loglevel;<br />
			uint32_t verbosity;<br />
		};</p>
<p>struct LogLevelFilter {<br />
			bool filter(const FilterCriteria&amp; criteria) {<br />
				if(criteria.loglevel == UNDEFINED || criteria.verbosity == UNDEFINED) {<br />
					return false;<br />
				} else if(criteria.loglevel &gt;= criteria.verbosity) {<br />
					return true;<br />
				} else {<br />
					return false;<br />
				}<br />
			}<br />
		};</code></p>
<p>The verbosity level would be somewhere defined in the code and every time I log something I pass the defined verbosity level to the log() method from the logger. So if if have some static variable or define called VERBOSITY, I would always pass VERBOSITY to log und depending on VERBOSITY and the log level for each log, the log message is displayed or not.</p>
<p>Now coming to the Channelfilter I´m not sure how i should define the channel i want to filter within my Filter.<br />
I dont want to add a channel() method within my logger since only Loggers with the Channerfilter policy are interested in the channel.<br />
I also dont want to do something like this<br />
<code><br />
struct LogSettings  {<br />
			static uint32_t verbosity;<br />
			static uint32_t channel;<br />
		};<br />
struct ChannelFilter {<br />
			bool filter(const FilterCriteria&amp; criteria) {<br />
				if(criteria.channel == UNDEFINED) {<br />
					return false;<br />
				} else if(criteria.channel == LogSettings::channel) {<br />
					return true;<br />
				} else {<br />
					return false;<br />
				}<br />
			}<br />
		};<br />
</code><br />
because all loggers would be bound to the LogSettings struct and I cannot tell Logger a to only filter by Channel &#8220;A&#8221; and Logger b to only filter by Channel &#8220;B&#8221;. This problem does not came into play with verbosity since the verbosity level can be shared by all loggers.</p>
<p>I hope i could state a clear question.</p>
<p>Regards Christian</p>
]]></content:encoded>
	</item>
</channel>
</rss>
