<?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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Comments for Shattered Terminal</title>
	
	<link>http://shatteredterminal.com</link>
	<description>i don't have a tagline yet</description>
	<lastBuildDate>Mon, 09 Nov 2009 23:57:05 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ShatteredTerminalComments" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Comment on Random sample from a long linked list by shards</title>
		<link>http://feedproxy.google.com/~r/ShatteredTerminalComments/~3/RIfmLYLONZA/</link>
		<dc:creator>shards</dc:creator>
		<pubDate>Mon, 09 Nov 2009 23:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-842</guid>
		<description>No, that's not true. (: I'm sure you can come up with this one too. Just take your time while coding, it'll help. I'll write one version that works. Unsatisfied, I'll try rewriting it to be simpler. Usually you'll learn a new trick or two whenever you do that. The next time you write a new code, the code will already be simpler.</description>
		<content:encoded><![CDATA[<p>No, that&#8217;s not true. (: I&#8217;m sure you can come up with this one too. Just take your time while coding, it&#8217;ll help. I&#8217;ll write one version that works. Unsatisfied, I&#8217;ll try rewriting it to be simpler. Usually you&#8217;ll learn a new trick or two whenever you do that. The next time you write a new code, the code will already be simpler.</p>
<img src="http://feeds.feedburner.com/~r/ShatteredTerminalComments/~4/RIfmLYLONZA" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-842</feedburner:origLink></item>
	<item>
		<title>Comment on Random sample from a long linked list by huy</title>
		<link>http://feedproxy.google.com/~r/ShatteredTerminalComments/~3/Mvo174xNEBo/</link>
		<dc:creator>huy</dc:creator>
		<pubDate>Sat, 07 Nov 2009 07:28:52 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-838</guid>
		<description>LOL. That must means I'm a very bad programmer ):</description>
		<content:encoded><![CDATA[<p>LOL. That must means I&#8217;m a very bad programmer ):</p>
<img src="http://feeds.feedburner.com/~r/ShatteredTerminalComments/~4/Mvo174xNEBo" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-838</feedburner:origLink></item>
	<item>
		<title>Comment on Random sample from a long linked list by shards</title>
		<link>http://feedproxy.google.com/~r/ShatteredTerminalComments/~3/uDHsd8-hNf8/</link>
		<dc:creator>shards</dc:creator>
		<pubDate>Thu, 05 Nov 2009 08:40:56 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-834</guid>
		<description>Thanks! Yes, the proof by induction is very straightforward, involving just a teensy bits of probability. (:

I didn't think the Java implementation is that nice though, it's just normal. Actually, I'm pretty sure someone can produce an even nicer code than this.</description>
		<content:encoded><![CDATA[<p>Thanks! Yes, the proof by induction is very straightforward, involving just a teensy bits of probability. (:</p>
<p>I didn&#8217;t think the Java implementation is that nice though, it&#8217;s just normal. Actually, I&#8217;m pretty sure someone can produce an even nicer code than this.</p>
<img src="http://feeds.feedburner.com/~r/ShatteredTerminalComments/~4/uDHsd8-hNf8" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-834</feedburner:origLink></item>
	<item>
		<title>Comment on Random sample from a long linked list by huy</title>
		<link>http://feedproxy.google.com/~r/ShatteredTerminalComments/~3/UV5IGNHpFG8/</link>
		<dc:creator>huy</dc:creator>
		<pubDate>Thu, 05 Nov 2009 08:24:38 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=192#comment-832</guid>
		<description>Nice indeed! I attempted to prove it and realize it's relatively easy as you said.

Like the Java implementation, very neat.</description>
		<content:encoded><![CDATA[<p>Nice indeed! I attempted to prove it and realize it&#8217;s relatively easy as you said.</p>
<p>Like the Java implementation, very neat.</p>
<img src="http://feeds.feedburner.com/~r/ShatteredTerminalComments/~4/UV5IGNHpFG8" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://shatteredterminal.com/2009/11/random-sample-from-a-long-linked-list/comment-page-1/#comment-832</feedburner:origLink></item>
	<item>
		<title>Comment on Copy and move semantics by shards</title>
		<link>http://feedproxy.google.com/~r/ShatteredTerminalComments/~3/vfKoM0CAC1w/</link>
		<dc:creator>shards</dc:creator>
		<pubDate>Thu, 05 Nov 2009 03:23:35 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=137#comment-829</guid>
		<description>Yes, you're perfectly right. I actually have not had to use assignment operator at all recently (a lot of my code disallow copy&amp;assign specifically). But you're perfectly right, I'll edit the post to reflect this. (:

Thanks!

P.S. Sorry for the late reply, was extremely busy with work and research to check on the block.</description>
		<content:encoded><![CDATA[<p>Yes, you&#8217;re perfectly right. I actually have not had to use assignment operator at all recently (a lot of my code disallow copy&#038;assign specifically). But you&#8217;re perfectly right, I&#8217;ll edit the post to reflect this. (:</p>
<p>Thanks!</p>
<p>P.S. Sorry for the late reply, was extremely busy with work and research to check on the block.</p>
<img src="http://feeds.feedburner.com/~r/ShatteredTerminalComments/~4/vfKoM0CAC1w" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://shatteredterminal.com/2009/03/copy-and-move-semantics/comment-page-1/#comment-829</feedburner:origLink></item>
	<item>
		<title>Comment on Closure in Java by Conoplelsoned</title>
		<link>http://feedproxy.google.com/~r/ShatteredTerminalComments/~3/c0w9QPBUaRk/</link>
		<dc:creator>Conoplelsoned</dc:creator>
		<pubDate>Sun, 01 Nov 2009 17:08:13 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=160#comment-804</guid>
		<description>Other variant is possible also</description>
		<content:encoded><![CDATA[<p>Other variant is possible also</p>
<img src="http://feeds.feedburner.com/~r/ShatteredTerminalComments/~4/c0w9QPBUaRk" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://shatteredterminal.com/2009/04/closure-in-java/comment-page-1/#comment-804</feedburner:origLink></item>
	<item>
		<title>Comment on ACL-IJCNLP ‘09 Blog by Callum</title>
		<link>http://feedproxy.google.com/~r/ShatteredTerminalComments/~3/REEEDtrFFn4/</link>
		<dc:creator>Callum</dc:creator>
		<pubDate>Sun, 01 Nov 2009 16:57:41 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=187#comment-803</guid>
		<description>Looks like your doing a good job with this blog.</description>
		<content:encoded><![CDATA[<p>Looks like your doing a good job with this blog.</p>
<img src="http://feeds.feedburner.com/~r/ShatteredTerminalComments/~4/REEEDtrFFn4" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://shatteredterminal.com/2009/05/acl-ijcnlp-09-blog/comment-page-1/#comment-803</feedburner:origLink></item>
	<item>
		<title>Comment on Copy and move semantics by Richie</title>
		<link>http://feedproxy.google.com/~r/ShatteredTerminalComments/~3/FoSpOPpQJbU/</link>
		<dc:creator>Richie</dc:creator>
		<pubDate>Thu, 18 Jun 2009 21:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=137#comment-204</guid>
		<description>&lt;blockquote&gt;vector list2 = list;  // Copy-on-assign&lt;/blockquote&gt;

This is not correct. The compiler will treat this line the same way as the first line and use the copy constructor (try it out yourself!). If you want to use the assignment operator you have to split up the declaration and the initialization in two lines.
Here is a small test program:

&lt;pre name="code" class="cpp"&gt;#include &lt;iostream&gt;
#include &lt;stdlib&gt;

class Test {
private:
	std::string name;
public:
	Test(std::string name) {
		this-&gt;name = name;	
		std::cout &lt;&lt; name &lt;&lt; ".Test()" &lt;&lt; std::endl;
	}

	Test(const Test&amp; t) {
		name = t.name;
		std::cout &lt;&lt; name &lt;&lt; ".Test(const Test&amp; t)" &lt;&lt; std::endl;
	}

	Test&amp; operator=(const Test&amp; t) {
		name = t.name;
		std::cout &lt;&lt; name &lt;&lt; ".operator=(const Test&amp; t)" &lt;&lt; std::endl;
		return *this;
	}

	~Test() {
		std::cout &lt;&lt; name &lt;&lt; ".~Test()" &lt;&lt; std::endl;
	}
};

int main(int argc, char** argv) {
	Test test1("test1");
	Test t2(test1);
	Test t3 = test1;
	t2 = t3;
	return 0;
}&lt;/pre&gt;

It's a quite strange exceptional rule in C++ and I was quite surprised reading it a few days ago.</description>
		<content:encoded><![CDATA[<blockquote><p>vector list2 = list;  // Copy-on-assign</p></blockquote>
<p>This is not correct. The compiler will treat this line the same way as the first line and use the copy constructor (try it out yourself!). If you want to use the assignment operator you have to split up the declaration and the initialization in two lines.<br />
Here is a small test program:</p>
<pre name="code" class="cpp">#include &lt;iostream&gt;
#include &lt;stdlib&gt;

class Test {
private:
	std::string name;
public:
	Test(std::string name) {
		this-&gt;name = name;
		std::cout &lt;&lt; name &lt;&lt; ".Test()" &lt;&lt; std::endl;
	}

	Test(const Test&amp; t) {
		name = t.name;
		std::cout &lt;&lt; name &lt;&lt; ".Test(const Test&amp; t)" &lt;&lt; std::endl;
	}

	Test&amp; operator=(const Test&amp; t) {
		name = t.name;
		std::cout &lt;&lt; name &lt;&lt; ".operator=(const Test&amp; t)" &lt;&lt; std::endl;
		return *this;
	}

	~Test() {
		std::cout &lt;&lt; name &lt;&lt; ".~Test()" &lt;&lt; std::endl;
	}
};

int main(int argc, char** argv) {
	Test test1("test1");
	Test t2(test1);
	Test t3 = test1;
	t2 = t3;
	return 0;
}</pre>
<p>It&#8217;s a quite strange exceptional rule in C++ and I was quite surprised reading it a few days ago.</p>
<img src="http://feeds.feedburner.com/~r/ShatteredTerminalComments/~4/FoSpOPpQJbU" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://shatteredterminal.com/2009/03/copy-and-move-semantics/comment-page-1/#comment-204</feedburner:origLink></item>
	<item>
		<title>Comment on Javascript: several paradigms in one by Sweelve</title>
		<link>http://feedproxy.google.com/~r/ShatteredTerminalComments/~3/FWh9lh49eKc/</link>
		<dc:creator>Sweelve</dc:creator>
		<pubDate>Thu, 07 May 2009 06:03:22 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=62#comment-128</guid>
		<description>now I'll stay tuned..</description>
		<content:encoded><![CDATA[<p>now I&#8217;ll stay tuned..</p>
<img src="http://feeds.feedburner.com/~r/ShatteredTerminalComments/~4/FWh9lh49eKc" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://shatteredterminal.com/2008/11/javascript-several-paradigms-in-one/comment-page-1/#comment-128</feedburner:origLink></item>
	<item>
		<title>Comment on Copy and move semantics by Another c++ Blog » Visual C++ Team Blog : decltype: C++0x Features in VC10, Part 3</title>
		<link>http://feedproxy.google.com/~r/ShatteredTerminalComments/~3/dgfoUQUHtmI/</link>
		<dc:creator>Another c++ Blog » Visual C++ Team Blog : decltype: C++0x Features in VC10, Part 3</dc:creator>
		<pubDate>Tue, 05 May 2009 14:26:08 +0000</pubDate>
		<guid isPermaLink="false">http://shatteredterminal.com/?p=137#comment-124</guid>
		<description>[...] Copy and move semantics [...]</description>
		<content:encoded><![CDATA[<p>[...] Copy and move semantics [...]</p>
<img src="http://feeds.feedburner.com/~r/ShatteredTerminalComments/~4/dgfoUQUHtmI" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://shatteredterminal.com/2009/03/copy-and-move-semantics/comment-page-1/#comment-124</feedburner:origLink></item>
</channel>
</rss>
