<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments for A Sense of Design</title>
	<link>http://codesynthesis.com/~boris/blog</link>
	<description>Boris Kolpackov's blog about software</description>
	<pubDate>Mon, 20 May 2013 22:23:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>Comment on ODB 2.2.0 Released by Boris Kolpackov</title>
		<link>http://codesynthesis.com/~boris/blog/2013/02/13/odb-2-2-0-released/#comment-2395</link>
		<author>Boris Kolpackov</author>
		<pubDate>Thu, 14 Feb 2013 03:42:12 +0000</pubDate>
		<guid>http://codesynthesis.com/~boris/blog/2013/02/13/odb-2-2-0-released/#comment-2395</guid>
		<description>mrB, of course we can, if someone writes them ;-). 

Seriously, though, I can't imagine them being very different compared to Raspberry PI, provided you are using one of the Linux distributions on BeagleBone. Most likely it is just a matter of getting a different cross-compiler toolchain.</description>
		<content:encoded><![CDATA[<p>mrB, of course we can, if someone writes them ;-). </p>
<p>Seriously, though, I can&#8217;t imagine them being very different compared to Raspberry PI, provided you are using one of the Linux distributions on BeagleBone. Most likely it is just a matter of getting a different cross-compiler toolchain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ODB 2.2.0 Released by mrB</title>
		<link>http://codesynthesis.com/~boris/blog/2013/02/13/odb-2-2-0-released/#comment-2393</link>
		<author>mrB</author>
		<pubDate>Thu, 14 Feb 2013 00:23:01 +0000</pubDate>
		<guid>http://codesynthesis.com/~boris/blog/2013/02/13/odb-2-2-0-released/#comment-2393</guid>
		<description>Can we have build instructions for Beaglebone/Board as well?</description>
		<content:encoded><![CDATA[<p>Can we have build instructions for Beaglebone/Board as well?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Visual Studio 2012 First Impressions by Boris Kolpackov</title>
		<link>http://codesynthesis.com/~boris/blog/2012/10/09/visual-studio-2012-first-impressions/#comment-2352</link>
		<author>Boris Kolpackov</author>
		<pubDate>Thu, 11 Oct 2012 12:44:50 +0000</pubDate>
		<guid>http://codesynthesis.com/~boris/blog/2012/10/09/visual-studio-2012-first-impressions/#comment-2352</guid>
		<description>Kenneth, the problem with this approach is it requires modification of each project. In my case that would be hundreds of them. Plus, what I am looking for here is the equivalent to /usr/{include, lib} on UNIX; i.e., a mechanism to locate common headers/libraries (e.g., database access libraries) without having to hardcode non-portable locations into project files/makefiles.</description>
		<content:encoded><![CDATA[<p>Kenneth, the problem with this approach is it requires modification of each project. In my case that would be hundreds of them. Plus, what I am looking for here is the equivalent to /usr/{include, lib} on UNIX; i.e., a mechanism to locate common headers/libraries (e.g., database access libraries) without having to hardcode non-portable locations into project files/makefiles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Visual Studio 2012 First Impressions by Kenneth Benzie</title>
		<link>http://codesynthesis.com/~boris/blog/2012/10/09/visual-studio-2012-first-impressions/#comment-2351</link>
		<author>Kenneth Benzie</author>
		<pubDate>Wed, 10 Oct 2012 19:36:13 +0000</pubDate>
		<guid>http://codesynthesis.com/~boris/blog/2012/10/09/visual-studio-2012-first-impressions/#comment-2351</guid>
		<description>Your issue pertaining to your include and library directories and so forth. Have you looked into creating your own Property Sheets instead of editing Microsoft.Cpp.Win32.User or Microsoft.Cpp.x64.User directly? This way you can set specific properties per solution/project and keep things separate if so required.

Alternatively properties that are not specific to a solution can be shared by loading the same Property Sheet in the various projects where required.

I suspect this would avoid the problems you encountered re VS2010 and VS2012 sharing</description>
		<content:encoded><![CDATA[<p>Your issue pertaining to your include and library directories and so forth. Have you looked into creating your own Property Sheets instead of editing Microsoft.Cpp.Win32.User or Microsoft.Cpp.x64.User directly? This way you can set specific properties per solution/project and keep things separate if so required.</p>
<p>Alternatively properties that are not specific to a solution can be shared by loading the same Property Sheet in the various projects where required.</p>
<p>I suspect this would avoid the problems you encountered re VS2010 and VS2012 sharing</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Emulating Boost.MultiIndex with Standard Containers by Maxim Yegorushkin</title>
		<link>http://codesynthesis.com/~boris/blog/2012/09/11/emulating-boost-multi-index-with-std-containers/#comment-2326</link>
		<author>Maxim Yegorushkin</author>
		<pubDate>Thu, 13 Sep 2012 11:40:55 +0000</pubDate>
		<guid>http://codesynthesis.com/~boris/blog/2012/09/11/emulating-boost-multi-index-with-std-containers/#comment-2326</guid>
		<description>&#62; ...  multi_index which has serious limitations on the mutability of elements

Not sure if const === serious. 

Boost multi_index tries to protect one from accidentally changing the key by returning references to const elements from find(). There is nothing wrong with casting away that const qualifier, it is like saying: "yeah, I know the key must not change, I promise not to do that and I know what I am doing".</description>
		<content:encoded><![CDATA[<p>&gt; &#8230;  multi_index which has serious limitations on the mutability of elements</p>
<p>Not sure if const === serious. </p>
<p>Boost multi_index tries to protect one from accidentally changing the key by returning references to const elements from find(). There is nothing wrong with casting away that const qualifier, it is like saying: &#8220;yeah, I know the key must not change, I promise not to do that and I know what I am doing&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using C++11 auto and decltype by Dmitri</title>
		<link>http://codesynthesis.com/~boris/blog/2012/08/14/using-cxx11-auto-decltype/#comment-2291</link>
		<author>Dmitri</author>
		<pubDate>Wed, 15 Aug 2012 16:39:04 +0000</pubDate>
		<guid>http://codesynthesis.com/~boris/blog/2012/08/14/using-cxx11-auto-decltype/#comment-2291</guid>
		<description>In addition to what was said in this article, I think the great benefit of keyword `auto` is its use follow the DRY principle. It also allows to capture the intention of coder more accurately. Consider:

int f() { return 42; }

int x = f(); // In this line, what we really want is a variable x of type whatever f() returns, which we have to write explicitly as int, violating DRY

auto y = f(); // This does not violate DRY, and matches the intention of having variable x of type whatever f() returns

That said, all these auto and decltype keywords make it more mandatory to have a good IDE with type induction. While previously you could use notepad and Search to find the type of a given variable, now that process becomes more convoluted. Instead, your IDE should be able to tell you what the type of any variable is right away.</description>
		<content:encoded><![CDATA[<p>In addition to what was said in this article, I think the great benefit of keyword `auto` is its use follow the DRY principle. It also allows to capture the intention of coder more accurately. Consider:</p>
<p>int f() { return 42; }</p>
<p>int x = f(); // In this line, what we really want is a variable x of type whatever f() returns, which we have to write explicitly as int, violating DRY</p>
<p>auto y = f(); // This does not violate DRY, and matches the intention of having variable x of type whatever f() returns</p>
<p>That said, all these auto and decltype keywords make it more mandatory to have a good IDE with type induction. While previously you could use notepad and Search to find the type of a given variable, now that process becomes more convoluted. Instead, your IDE should be able to tell you what the type of any variable is right away.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using C++11 auto and decltype by Boris Kolpackov</title>
		<link>http://codesynthesis.com/~boris/blog/2012/08/14/using-cxx11-auto-decltype/#comment-2290</link>
		<author>Boris Kolpackov</author>
		<pubDate>Tue, 14 Aug 2012 19:24:24 +0000</pubDate>
		<guid>http://codesynthesis.com/~boris/blog/2012/08/14/using-cxx11-auto-decltype/#comment-2290</guid>
		<description>Jesse, only if auto is not used to form a reference the top-level const-qualifier is stripped. I know this is a lot of "if-this-then-that" special cases. That's why I like the idea of mentally re-writing a statement with auto into a function template. Consider:

&lt;pre&gt;&lt;br /&gt;
template &#60;typename T&#62;&lt;br /&gt;
void g1 (T x);&lt;br /&gt;
&#160;&lt;br /&gt;
template &#60;typename T&#62;&lt;br /&gt;
void g2 (T&#38; x);&lt;br /&gt;
&#160;&lt;br /&gt;
g1 (f ()); // T is int (not const int), x is int&lt;br /&gt;
g2 (f ()); // T is const int, x is const int&#38;&lt;br /&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Jesse, only if auto is not used to form a reference the top-level const-qualifier is stripped. I know this is a lot of &#8220;if-this-then-that&#8221; special cases. That&#8217;s why I like the idea of mentally re-writing a statement with auto into a function template. Consider:</p>
<pre>
template &lt;typename T&gt;
void g1 (T x);
&nbsp;
template &lt;typename T&gt;
void g2 (T&amp; x);
&nbsp;
g1 (f ()); // T is int (not const int), x is int
g2 (f ()); // T is const int, x is const int&amp;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using C++11 auto and decltype by Jesse</title>
		<link>http://codesynthesis.com/~boris/blog/2012/08/14/using-cxx11-auto-decltype/#comment-2289</link>
		<author>Jesse</author>
		<pubDate>Tue, 14 Aug 2012 18:30:13 +0000</pubDate>
		<guid>http://codesynthesis.com/~boris/blog/2012/08/14/using-cxx11-auto-decltype/#comment-2289</guid>
		<description>You first say this:

const int&#38; f3 ();
auto a3 = f3 (); // a1 is int

Then you say that

const int&#38; f ();
auto&#38; x = f (); // auto -&#62; const int, x is const int&#38;

Wouldn't this imply that:
auto&#38; x = f (); // auto -&#62; int, x is int&#38;</description>
		<content:encoded><![CDATA[<p>You first say this:</p>
<p>const int&amp; f3 ();<br />
auto a3 = f3 (); // a1 is int</p>
<p>Then you say that</p>
<p>const int&amp; f ();<br />
auto&amp; x = f (); // auto -&gt; const int, x is const int&amp;</p>
<p>Wouldn&#8217;t this imply that:<br />
auto&amp; x = f (); // auto -&gt; int, x is int&amp;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on C++ Event Logging with SQLite and ODB by Boris Kolpackov</title>
		<link>http://codesynthesis.com/~boris/blog/2012/08/07/cxx-event-logging-sqlite-odb/#comment-2268</link>
		<author>Boris Kolpackov</author>
		<pubDate>Thu, 09 Aug 2012 18:11:10 +0000</pubDate>
		<guid>http://codesynthesis.com/~boris/blog/2012/08/07/cxx-event-logging-sqlite-odb/#comment-2268</guid>
		<description>Dave,

Yes, ODB wraps the SQLite transaction into the &lt;code&gt;odb::transaction&lt;/code&gt; RAII class. While in the article I use the one transaction per log entry approach (see the body of the &lt;code&gt;log()&lt;/code&gt; function), it is also easy to batch multiple log entries into a single transaction:

&lt;pre&gt;&lt;br /&gt;
transaction t (db.begin ());&lt;br /&gt;
&#160;&lt;br /&gt;
log (db, event (buy,&#160;&#160;&#34;INTC&#34;, 100, 25.10));&lt;br /&gt;
log (db, event (buy,&#160;&#160;&#34;AMD&#34;,&#160;&#160;200, 4.05));&lt;br /&gt;
log (db, event (buy,&#160;&#160;&#34;ARM&#34;,&#160;&#160;200, 26.25));&lt;br /&gt;
&#160;&lt;br /&gt;
t.commit ();&lt;br /&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Dave,</p>
<p>Yes, ODB wraps the SQLite transaction into the <code>odb::transaction</code> RAII class. While in the article I use the one transaction per log entry approach (see the body of the <code>log()</code> function), it is also easy to batch multiple log entries into a single transaction:</p>
<pre>
transaction t (db.begin ());
&nbsp;
log (db, event (buy,&nbsp;&nbsp;&quot;INTC&quot;, 100, 25.10));
log (db, event (buy,&nbsp;&nbsp;&quot;AMD&quot;,&nbsp;&nbsp;200, 4.05));
log (db, event (buy,&nbsp;&nbsp;&quot;ARM&quot;,&nbsp;&nbsp;200, 26.25));
&nbsp;
t.commit ();
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on C++ Event Logging with SQLite and ODB by Dave Johansen</title>
		<link>http://codesynthesis.com/~boris/blog/2012/08/07/cxx-event-logging-sqlite-odb/#comment-2267</link>
		<author>Dave Johansen</author>
		<pubDate>Thu, 09 Aug 2012 17:14:05 +0000</pubDate>
		<guid>http://codesynthesis.com/~boris/blog/2012/08/07/cxx-event-logging-sqlite-odb/#comment-2267</guid>
		<description>Does the ODB take care of transaction handling for you? Because if you're writing to disk then to my knowledge sqlite can only do a limited number of transactions per second ( http://www.sqlite.org/faq.html#q19 ).</description>
		<content:encoded><![CDATA[<p>Does the ODB take care of transaction handling for you? Because if you&#8217;re writing to disk then to my knowledge sqlite can only do a limited number of transactions per second ( <a href="http://www.sqlite.org/faq.html#q19" rel="nofollow">http://www.sqlite.org/faq.html#q19</a> ).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
