<?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/"
> <channel><title>Comments on: Learning Python</title> <atom:link href="http://stephenwoods.net/2010/02/21/learning-python/feed/" rel="self" type="application/rss+xml" /><link>http://stephenwoods.net/2010/02/21/learning-python/</link> <description>!important</description> <lastBuildDate>Wed, 12 May 2010 01:54:54 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: kellan</title><link>http://stephenwoods.net/2010/02/21/learning-python/comment-page-1/#comment-45</link> <dc:creator>kellan</dc:creator> <pubDate>Wed, 12 May 2010 01:54:54 +0000</pubDate> <guid
isPermaLink="false">http://stephenwoods.net/?p=133#comment-45</guid> <description>&lt;pre class=&quot;brush: javascript&quot;&gt;
object Coin {
val rand = new scala.util.Random()
def toss() = {
rand.nextBoolean()
}
}var heads = 0
var tails = 0
val range = 0.until(1000000)
for (i &lt;- range) {
if (Coin.toss()) {
heads += 1
} else {
tails += 1
}
}println(&quot;Heads: &quot; + heads + &quot; Tails: &quot; + tails)
&lt;/pre&gt;</description> <content:encoded><![CDATA[<pre class="brush: javascript">
object Coin {
	val rand = new scala.util.Random()

	def toss() = {
		rand.nextBoolean()
	}
}

var heads = 0
var tails = 0
val range = 0.until(1000000)
for (i &lt;- range) {
	if (Coin.toss()) {
		heads += 1
	} else {
		tails += 1
	}
}

println(&quot;Heads: &quot; + heads + &quot; Tails: &quot; + tails)
</pre>]]></content:encoded> </item> <item><title>By: Stephen</title><link>http://stephenwoods.net/2010/02/21/learning-python/comment-page-1/#comment-37</link> <dc:creator>Stephen</dc:creator> <pubDate>Sun, 21 Feb 2010 08:40:31 +0000</pubDate> <guid
isPermaLink="false">http://stephenwoods.net/?p=133#comment-37</guid> <description>You and I think alike without sleep. ;P</description> <content:encoded><![CDATA[<p>You and I think alike without sleep. ;P</p> ]]></content:encoded> </item> <item><title>By: Luke Smith</title><link>http://stephenwoods.net/2010/02/21/learning-python/comment-page-1/#comment-36</link> <dc:creator>Luke Smith</dc:creator> <pubDate>Sun, 21 Feb 2010 07:48:10 +0000</pubDate> <guid
isPermaLink="false">http://stephenwoods.net/?p=133#comment-36</guid> <description>Well, technically, done once after the loop shouldn&#039;t change the results much.  For some reason (read: lack of sleep) I thought it was in the loop :)</description> <content:encoded><![CDATA[<p>Well, technically, done once after the loop shouldn&#8217;t change the results much.  For some reason (read: lack of sleep) I thought it was in the loop <img
src='http://stephenwoods.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Luke Smith</title><link>http://stephenwoods.net/2010/02/21/learning-python/comment-page-1/#comment-35</link> <dc:creator>Luke Smith</dc:creator> <pubDate>Sun, 21 Feb 2010 07:45:32 +0000</pubDate> <guid
isPermaLink="false">http://stephenwoods.net/?p=133#comment-35</guid> <description>Did you try the js/node version without JSON.stringify?  It&#039;s a far more complicated operation than just printing output.</description> <content:encoded><![CDATA[<p>Did you try the js/node version without JSON.stringify?  It&#8217;s a far more complicated operation than just printing output.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc (user agent is rejected)
Database Caching using apc

Served from: stephenwoods.net @ 2010-09-08 13:50:28 -->