<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	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>Moar Dataz!</title>
	<atom:link href="http://moardataz.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://moardataz.wordpress.com</link>
	<description>Programming, Wierd Ideas, and Misc. Geekery</description>
	<lastBuildDate>Tue, 04 May 2010 16:51:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='moardataz.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Moar Dataz!</title>
		<link>http://moardataz.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://moardataz.wordpress.com/osd.xml" title="Moar Dataz!" />
	<atom:link rel='hub' href='http://moardataz.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Books for Geeks</title>
		<link>http://moardataz.wordpress.com/2010/02/21/books-for-geeks/</link>
		<comments>http://moardataz.wordpress.com/2010/02/21/books-for-geeks/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 22:51:32 +0000</pubDate>
		<dc:creator>killercoffee</dc:creator>
				<category><![CDATA[Analog]]></category>

		<guid isPermaLink="false">http://moardataz.wordpress.com/?p=129</guid>
		<description><![CDATA[I recommend all these books, if not by virtue of having read them myself, then by virtue of researching them. Here we go! Field Guides Army Ranger Handbook: $20 new, $40 used (wtf). There is also a seller on Amazon selling them for $8.50. The U.S. Army publishes all sorts of survival handbooks, some of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=129&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recommend all these books, if not by virtue of having read them myself, then by virtue of researching them. Here we go!</p>
<p><strong>Field Guides</strong></p>
<p><a href="http://www.amazon.com/Ranger-Handbook-Army-Newest-Dept/dp/1601702116/ref=sr_1_4?ie=UTF8&amp;s=books&amp;qid=1266787688&amp;sr=1-4">Army Ranger Handbook</a>: $20 new, $40 used (wtf). There is also a seller on Amazon selling them for $8.50. The U.S. Army publishes all sorts of survival handbooks, some of which are <a href="http://www.equipped.org/fm21-76.htm">readable online</a>. However, this one is, as far as I can tell, the best of the lot (I obviously haven&#8217;t bought them all, geez).</p>
<p><a href="http://www.amazon.com/Where-There-No-Doctor-Handbook/dp/0942364155/ref=pd_bxgy_b_text_c">Where There Is No Doctor</a>: $20 new, $21 used (really, Amazon?). A great, great reference for all sorts of doctoring. If you plan on going&#8230;well, where there is no doctor, you should have this book. First written in the 1970s, updated over the years and most recently in 2007. I own a copy and take it with me on trips everywhere. It has info on everything from gangrene to various bites to hypothermia and cholera.</p>
<p><a href="http://www.amazon.com/Pocket-Ref-Thomas-J-Glover/dp/1885071337/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1266788170&amp;sr=1-1">Pocket Ref</a>: $9.32 new, don&#8217;t buy used. This book, by some miracle of small font and thin pages, crams TONS of information into a book that will easily fit in your pocket. I recommend clicking on &#8220;Look inside this book&#8221; on Amazon and checking out the table of contents and stuff. Funny story: When I was going to buy this, I figured that I would check to see if it had something random I wanted to know. If it did have it, I would buy it. I wanted to know about cloud formations and what weather they signaled. Well, it didn&#8217;t have it but I bought it anyways. Then, when it arrived, I checked again and <em>it had three pages about various cloud formations</em>. Jackpot!</p>
<p><a href="http://www.amazon.com/Zombie-Survival-Guide-Complete-Protection/dp/1400049628/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1266789525&amp;sr=1-1">The Zombie Survival Guide</a>: $10 new, $6 used. You might need this sooner than you think. Very comprehensive.</p>
<p><strong> Programming/Math</strong></p>
<p><a href="http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/0201657880">Programming Pearls, 2nd edition</a>: $30 new, $20 used. This book is an amazing collection of various code examples that illustrate all sorts of algorithms and techniques. A great read.</p>
<p><a href="http://www.edwardtufte.com/tufte/books_vdqi">Edward Tufte&#8217;s books on data visualzation</a>: I like Edward Tufte&#8217;s books. They have some amazing stuff in them. However, unless you&#8217;re hardcore into statistics and data visualization, you could settle for <a href="http://www.amazon.com/Envisioning-Information-Edward-R-Tufte/dp/0961392118/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1266787324&amp;sr=1-2">Envisioning Information</a> ($35 new, $17 used) and <a href="http://www.amazon.com/Visual-Display-Quantitative-Information-2nd/dp/0961392142/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1266787324&amp;sr=1-1">The Visual Display of Quantitative Information</a> (2nd ed. $28 new, $17 used).</p>
<p><a href="http://www.amazon.com/Schaums-Solved-Problems-Calculus-3000/dp/0071635343/ref=sr_1_3?ie=UTF8&amp;s=books&amp;qid=1266787519&amp;sr=1-3">Schaum&#8217;s 3000 Solved Calculus Problems</a>: ($19 new, don&#8217;t buy used). Worried about your Calculus skills going to waste when you have no math-related classes? I do. Hence this book, recommended by my Calc prof. Do a couple problems a day and you should be good to go.</p>
<p><strong>Bathroom Companions</strong></p>
<p><a href="http://www.amazon.com/Mental-Floss-Presents-Condensed-Knowledge/dp/0060568062/ref=sr_1_3?ie=UTF8&amp;s=books&amp;qid=1266788809&amp;sr=1-3">Mental Floss: Condensed Knowledge</a> <a href="http://www.amazon.com/Mental-Floss-History-World-Civilizations/dp/0061842672/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1266788809&amp;sr=1-1">and</a> <a href="http://www.amazon.com/mental-floss-presents-Forbidden-Knowledge/dp/006078475X/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1266788809&amp;sr=1-2">others</a>: $10 each. Great books by the mental_floss magazine, which is itself pretty excellent. Full of fun trivia and informative tidbits! All you need to do to appear cultured is to remember half the material in one of these books.</p>
<p><a href="http://www.amazon.com/MAD-Bathroom-Companion-Mother-Load/dp/0760763453/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1266788951&amp;sr=1-1">MAD Bathroom Companion: The Mother Load</a>: $20. MAD Magazine compiled a bunch of stuff into this ridiculous, funny, huge book consisting of hilarious comics and crude jokes. As its name suggests, it truly is a great bathroom companion.</p>
<p><strong>Philosophy</strong></p>
<p><a href="http://www.amazon.com/Quran-Oxford-Worlds-Classics/dp/0199535957/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1266786206&amp;sr=1-1">Koran</a> (Qu&#8217;ran) [<a href="http://www.amazon.com/Quran-Translation-Sayed-Razwy/dp/1879402297/ref=pd_cp_b_1">alternate translation</a>]: $10.00 new, $5.00 used. alternate translation $5.00 new. I&#8217;m disappointed by the number of Americans who blindly judge the Muslim faith. This text is <strong>the</strong> Muslim text, and honestly if you read it, it&#8217;s not at all bad. It is a very open religion, and it&#8217;s only the jihadists who, like the Catholic inquisitors, break the very tenets of their faith in blind misguidance. If nothing else, it&#8217;s a good read.</p>
<p><a href="http://www.amazon.com/Tao-Te-Ching-Perennial-Classics/dp/0061142662/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1266786526&amp;sr=1-1">Tao te Ching</a> and <a href="http://www.amazon.com/Book-Chuang-Tzu-Penguin-Classics/dp/014045537X/ref=pd_cp_b_1">Chuang Tzu</a>: $10.00 each new. Taoism is a religion that has got it right, if you ask me. These two texts are central to the Taoist faith. Whether or not they make sense depends on how slowly you read them, but the Taoist philosophy is outlined here, as a gem in the rough, that can help anyone with some spiritual improvement.</p>
<p><a href="http://www.amazon.com/Bhagavad-Gita-Translation-Stephen-Mitchell/dp/0609810340/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1266786838&amp;sr=1-2">Bhagavad Gita</a>: $10.00 new, $7.00 used. An excellent translation by Stephen Mitchell, this book provides a surprising insight into Asiatic and Indian religion. The Bhagavad Gita is the central text of Hinduism,  from which both Taoism and Buddhism have sprung. It has lots of good ideas, and understanding the Gita is important if you want to understand Indian culture (this is less true now, but still).</p>
<p><a href="http://www.amazon.com/Bible-James-Version-Study-Burgundy/dp/0785201688/ref=sr_1_6?ie=UTF8&amp;s=books&amp;qid=1266787130&amp;sr=1-6">King James Study Bible</a>: $30 new, $25 used. Although I haven&#8217;t bought this bible myself, having inherited two or three bibles from my parents, I plan on getting it eventually. The Bible is a great story, and it presents interesting ideas. I wouldn&#8217;t base my life on it, but oh well. Study bibles have <strong>tons</strong> of additional stuff. This particular bible has over 2,000 pages!</p>
<p><a href="http://www.amazon.com/gp/product/0465069347/ref=oss_product">Plato&#8217;s Republic</a>: $13 new, $4 used. I don&#8217;t know what to say about this one, to be honest. It&#8217;s one of the books I just bought. Apparently one of the best translations of Plato, and it comes with a glossary and introduction and essay and stuff (standard fare). Plato&#8217;s Republic is probably the most well-known piece of Greek philosophy, although not the most recognized piece of literature (that would probably be the Odyssey, which, along with the Iliad, also has an entry on this list). Like most (all?) of Plato&#8217;s work, Republic is a Socratic dialog: Socrates and various other people talking. Republic had a pretty major impact on politics and political science, including setting the groundwork for our society today.</p>
<p><strong>Comics</strong></p>
<p><a href="http://www.amazon.com/Bone-Complete-Cartoon-Epic-One/dp/188896314X/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1266789412&amp;sr=1-1">Bone: One Volume Addition</a>: $25 new, $15 used. An absurdly excellent comic with an epic plot and hilarious writing. Highly recommended! It&#8217;s sort of a &#8220;thinking man&#8217;s comic&#8221; if said thinking man likes to crap his pants from laughing.</p>
<p><strong>Fiction</strong></p>
<p><a href="http://www.amazon.com/Iliad-Penguin-Classics-Homer/dp/0140447946/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1266793032&amp;sr=1-1">The Iliad</a> and <a href="http://www.amazon.com/Odyssey-Penguin-Classics-Homer/dp/0143039954/ref=pd_cp_b_3">The Odyssey</a>. $10 each new, $3-4 each used. Classics in every sense of the word, these epic poem/novels are not only ancient but they are still very engrossing. In the Iliad, relive the epic of the Trojan War in a way that no later book has been able to reproduce. In the Odyssey, follow the journey of Odysseus through many perils to his front door, and then observe as he acts really sneaky and kills lots of dudes in his house.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/moardataz.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/moardataz.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/moardataz.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/moardataz.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/moardataz.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/moardataz.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/moardataz.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/moardataz.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/moardataz.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/moardataz.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/moardataz.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/moardataz.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/moardataz.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/moardataz.wordpress.com/129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=129&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://moardataz.wordpress.com/2010/02/21/books-for-geeks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c61e15ed5d4592b07e6d997caa3cbb7d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">killercoffee</media:title>
		</media:content>
	</item>
		<item>
		<title>Computer Simulation &#8211; Further Examination</title>
		<link>http://moardataz.wordpress.com/2010/02/20/computer-simulation-further-examination/</link>
		<comments>http://moardataz.wordpress.com/2010/02/20/computer-simulation-further-examination/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 05:24:01 +0000</pubDate>
		<dc:creator>killercoffee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://moardataz.wordpress.com/?p=119</guid>
		<description><![CDATA[So, you are probably living in a computer simulation. Now what? Recursive Simulations It might have occured to you to wonder about the people that (may have) made the simulation you (may be) living in. Doesn&#8217;t the same logic apply to them, indicating that they are probably living in a computer simulation? Well, just like [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=119&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So, <a href="http://moardataz.wordpress.com/2010/02/18/why-you-are-probably-in-a-computer-simulation/">you are probably living in a computer simulation</a>. Now what?</p>
<p><b>Recursive Simulations</b></p>
<p>It might have occured to you to wonder about the people that (may have) made the simulation you (may be) living in. Doesn&#8217;t the same logic apply to them, indicating that they are probably living in a computer simulation? </p>
<p>Well, just like you, they <i>probably</i> are. Eventually, though, the odds will be overcome. Eventually, somewhere in the (probably long) string of simulations that would be assumed to exist, there must be an original simply by chance. However, note that as soon as you accept an additional level of simulation recursion, the chances of being biological decrease drastically. If N is the number of minds presumed to be in all simulations created by a society, S is the number of societies per simulation that develop simulations themselves, R is the number of recursions accepted, and P is the number of biologically real entities in the universe, then the chance of being real is given by:</p>
<p><img src="http://moardataz.files.wordpress.com/2010/02/eqn5768.png?w=470" alt="\frac{(N \bullet S)^R + P}{P}" title="Recursive Reality Formula"   class="aligncenter size-full wp-image-127" /></p>
<p>As you see, each additional level of recursion reduces the chance of being original by (S*N), the number of simulatons created within each simulation (or within reality): a very large number, presumably.</p>
<p><b>Religion In Simulated Reality</b></p>
<p>An interesting side effect of living in a simulated reality is that it makes God-based religions inherently possible. We were created by someone, maybe, who may have a purpose for us. However, the idea lends itself best to <a href="http://books.google.com/books?id=v8dYNNV4rFUC&amp;dq=tao+te+ching&amp;source=gbs_navlinks_s">Taoism</a>, which is complicated to summarize but basically believes in a central &#8220;life stream&#8221; called the Tao, or Way, that it is your job to follow. This is very easily applicable to life inside a computer program, which has a general flow of execution, and similarly applicable to life <i>as</i> a computer program, which is designed naturally to do specific things. This is good because I also think that Taoism is an extremely valid philosophy for life even if it&#8217;s not in a computer simulation.</p>
<p><b>Life After Death</b></p>
<p>Basically there is probably none. Your consciousness ends, your thread in the program is terminated. However, depending on the intent of the system, it could be that certain essential aspects of your personality, assigned when you are born, are recycled for future threads (purely speculation based on the use of the simulation. If it is designed to examine how certian types of individuals act in different environments, then your &#8220;type of individual&#8221; might be recyclable). And the memory used by your consciousness&#8217;s thread probably will be recycled in any case, but that is hollow: one object that uses memory doesn&#8217;t influence objects that use that same memory later.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/moardataz.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/moardataz.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/moardataz.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/moardataz.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/moardataz.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/moardataz.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/moardataz.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/moardataz.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/moardataz.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/moardataz.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/moardataz.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/moardataz.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/moardataz.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/moardataz.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=119&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://moardataz.wordpress.com/2010/02/20/computer-simulation-further-examination/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c61e15ed5d4592b07e6d997caa3cbb7d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">killercoffee</media:title>
		</media:content>

		<media:content url="http://moardataz.files.wordpress.com/2010/02/eqn5768.png" medium="image">
			<media:title type="html">Recursive Reality Formula</media:title>
		</media:content>
	</item>
		<item>
		<title>The Unfortunate Effects of Cyberization</title>
		<link>http://moardataz.wordpress.com/2010/02/18/the-unfortunate-effects-of-cyberization/</link>
		<comments>http://moardataz.wordpress.com/2010/02/18/the-unfortunate-effects-of-cyberization/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 16:58:31 +0000</pubDate>
		<dc:creator>killercoffee</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://moardataz.wordpress.com/?p=111</guid>
		<description><![CDATA[Thinking about my post on how you may be living in a computer simulation, I started to wonder about what would happen should humanity develop the &#8220;Cyberbrain&#8221;: a powerful AI computer that is designed to be written with the data of a single regular human&#8217;s brain for the purpose of copying that person&#8217;s identity into [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=111&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Thinking about my post on how you may be living in a computer simulation, I started to wonder about what would happen should humanity develop the &#8220;Cyberbrain&#8221;: a powerful AI computer that is designed to be written with the data of a single regular human&#8217;s brain for the purpose of copying that person&#8217;s identity into a digital medium (cyberizing).</p>
<p>I mean, when you look at this operation from the outside, it&#8217;s pretty simple. Regular brain goes dead, cyber brain wakes up. Consciousness transferred. Right? However, what if you&#8217;re the dude actually using the regular brain. If you think about it, moving data is the same as copying it and then deleting the original. In this context, it meas that your consciousness is <i>cloned</i>, and then the original consciousness, you, is <i>destroyed</i>. </p>
<p>So you have a clone of your consciousness in the cyber brain, sure, and it might even be thinking, &#8220;Yes! The operation was a success! My consciousness was transferred perfectly!&#8221; while, of course, the original consciousness, <i>you</i> is dead. This puts a major damper on my desire to be cyberized, which I&#8217;ve had for many years. Sure I get to clone myself into a computer brain, but how does that help me any?</p>
<p>Weird.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/moardataz.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/moardataz.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/moardataz.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/moardataz.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/moardataz.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/moardataz.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/moardataz.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/moardataz.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/moardataz.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/moardataz.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/moardataz.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/moardataz.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/moardataz.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/moardataz.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=111&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://moardataz.wordpress.com/2010/02/18/the-unfortunate-effects-of-cyberization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c61e15ed5d4592b07e6d997caa3cbb7d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">killercoffee</media:title>
		</media:content>
	</item>
		<item>
		<title>Why You Are Probably In a Computer Simulation</title>
		<link>http://moardataz.wordpress.com/2010/02/18/why-you-are-probably-in-a-computer-simulation/</link>
		<comments>http://moardataz.wordpress.com/2010/02/18/why-you-are-probably-in-a-computer-simulation/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 01:29:18 +0000</pubDate>
		<dc:creator>killercoffee</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://moardataz.wordpress.com/?p=99</guid>
		<description><![CDATA[I bet that I can prove, given a few reasonable assumptions, that you are extremely likely to be an AI living in a simulated or otherwise artificially made reality. (This was not my idea originally but I think that the original hypothesis can be altered slightly). The idea itself is rather simple. Given that a) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=99&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I bet that I can prove, given a few reasonable assumptions, that you are extremely likely to be an AI living in a simulated or otherwise artificially made reality. (This was <a href="http://www.simulation-argument.com/">not my idea</a> originally but I think that the original hypothesis can be altered slightly).</p>
<p>The idea itself is rather simple. Given that <strong>a)</strong> there exists, will exist, or has existed a sentient species or individual with the technology to create simulated reality, <strong>b)</strong> said species or individual only uses a tiny fraction of their resources to create this simulation, <strong>c)</strong> said species or individual would want to create, and would in fact create, said realities in large numbers, and <strong>d)</strong> there are enough conscious minds in these realities that, when realities are created en masse, there are orders of magnitude more conscious minds in simulated realities than there are in true reality, then your conscious mind is more likely to be in a simulation than to be real. I will examine these premises one at a time.</p>
<p><b>A. There exists, will exist, or has existed a sentient species or individual with the technology to create simulated reality.</b></p>
<p>This particular premise seems the most obvious to me, but is apparently difficult for some people to come to grips with. I suggest reading <a href="http://www.simulation-argument.com/">the original argument</a> for a detailed analysis of its plausibility. In it, the author Nick Bostrom gives a detailed analysis of the theoretical feasibility of having the computing power necessary to simulate reality. He comes to the conclusion that &#8220;a rough approximation of the computational power of a planetary-mass computer is 10^42 operations per second, and that assumes only already known nanotechnological designs, which are probably far from optimal. A single such a computer could simulate the entire mental history of humankind (call this an ancestor-simulation) by using less than one millionth of its processing power for one second.&#8221; </p>
<p>Whether or not this is true, I cannot say. I think of it this way: The universe is nearly infinite in size, relative to the scale of Earth. Similarly, the time scale we are talking about (which is &#8220;any time at all&#8221;) is nearly infinite. It can simply be said that, with nearly infinite space, nearly infinite resources, and nearly infinite time, basically anything can happen. It&#8217;s even possible that humankind will be able to develop this technology ourselves.</p>
<p><b>B: Said species or individual only uses a tiny fraction of their resources to create this simulation.</b></p>
<p>This statement is considered true for the same reasons given above. If the race can create simulated reality, it won&#8217;t be long before they can do it really easily. Eventually, it will be a trivial task (as stated above, using a suboptimal planetary computer, you could calculate the entire mental history of humankind one million times in a second). Basically, if you can swallow premise A, this one should follow without issue.</p>
<p><b>C: Said species or individual would want to create, and would in fact create, said realities in large numbers.</b></p>
<p>Okay, here we might get fuzzy. On one hand, who wouldn&#8217;t want to make a bunch of realities and play God? I sure would! I have a feeling that once we have the computing power to do this, we totally would make them all over the place. There are lots of reasons to do so: we could simulate our own evolution with slight variations to determine how it would alter the future, replay the development of humankind for entertainment purposes, or complete a totally different species to determine how they would survive. The realities would be good for research but they would also probably be a lot of fun. Think of it as the ultimate Sims.</p>
<p>On the other hand, though, I question the assumption that the society or individual would make a bunch of these realities (a bunch = more than 100,000, say) for the same reason that I don&#8217;t use my computer for running 100,000 instances of <a href="http://www.nethack.org/">Nethack</a> instead of playing <a href="http://www.teamfortress.com/">Team Fortress 2</a>: why bother with old technology? When your computing power vastly outstrips that which is required for simulations, why bother generating them (since you probably have something that needs even more computing power to do).</p>
<p><b>D: There are enough conscious minds in these realities that, when realities are created en masse, there are orders of magnitude more conscious minds in simulated realities than there are in true reality.</b></p>
<p>This premise goes without saying, and indeed, went without saying in Prof. Bostrom&#8217;s report: how many minds are in these simulated realities? If each only has one, well&#8230; um. Yeah. However, It is assumed that each created reality has a bunch of AIs in it (tens of billions or more): enough that the number of consciousnesses in the simulated realities dwarf the number of consciousnesses in the actual reality.</p>
<p><b>Conclusion: You&#8217;re In Another Reality?</b></p>
<p>If these four statements are true, the result is that you are probably in another reality! Since far more conscious minds exist within simulated realities than exist out of them, your conscious mind is far more likely to be in a simulated reality. Fun!</p>
<p>Look for future episodes in the &#8220;Computer Simulation&#8221; crazy train including recursive simulations, probability of technology, and maybe even some concrete proofs (though <a href="http://www.simulation-argument.com/simulation.html">the original</a> has some nice maths along these lines in Section IV).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/moardataz.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/moardataz.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/moardataz.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/moardataz.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/moardataz.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/moardataz.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/moardataz.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/moardataz.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/moardataz.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/moardataz.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/moardataz.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/moardataz.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/moardataz.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/moardataz.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=99&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://moardataz.wordpress.com/2010/02/18/why-you-are-probably-in-a-computer-simulation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c61e15ed5d4592b07e6d997caa3cbb7d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">killercoffee</media:title>
		</media:content>
	</item>
		<item>
		<title>Fun With Squeak: Sparklines!</title>
		<link>http://moardataz.wordpress.com/2010/02/17/fun-with-squeak-sparklines/</link>
		<comments>http://moardataz.wordpress.com/2010/02/17/fun-with-squeak-sparklines/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 18:50:38 +0000</pubDate>
		<dc:creator>killercoffee</dc:creator>
				<category><![CDATA[Dataz Visualization]]></category>
		<category><![CDATA[Squeak Smalltalk]]></category>

		<guid isPermaLink="false">http://moardataz.wordpress.com/?p=93</guid>
		<description><![CDATA[Before you read this, I suggest you take a second to get familiar with sparklines. They are like tiny, embeddable plots, as originally coined by my statistics hero, Edward Tufte, in his book Beautiful Evidence. In short, a sparkline is a small plot, generally a line plot, that is about the same height as the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=93&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Before you read this, I suggest you take a second to get familiar with <a href="http://en.wikipedia.org/wiki/Sparkline">sparklines</a>. They are like tiny, embeddable plots, as originally coined by my statistics hero, <a href="http://www.edwardtufte.com/tufte/">Edward Tufte</a>, in his book <a href="http://www.edwardtufte.com/tufte/books_be">Beautiful Evidence</a>.</p>
<p>In short, a sparkline is a small plot, generally a line plot, that is about the same height as the text around it. It should also have a dot at its maximum point, if it&#8217;s trying to be a real, true sparkline, and it should have a greyish line. However, there is a lot of variation here, and people even make sparkhistograms and sparkpiecharts.</p>
<p>Now that you know what sparklines are, I bet you want to make some. Well&#8230;okay! There are a lot of ways to do this. There are (presumably good) sparklines libraries for <a href="http://sparkline.org/">PHP</a>, <a href="http://nubyonrails.com/pages/sparklines">Ruby</a>, <a href="http://omnipotent.net/jquery.sparkline/">jQuery</a> (this one looks especially interesting), and even <a href="http://sparklines-excel.blogspot.com/">Excel</a>. Or, if you&#8217;re a bit crazy and/or like doing things yourself, you could make your own sparkline library! I chose the latter option.</p>
<p>Thus, I&#8217;ve created a working, not-yet-perfect sparkline maker for Squeak Smalltalk. Squeak makes graphics (called Morphs) ridiculously easy, and thus makes sparklines pretty simple. Before we begin, a quick note: Squeak represents (x,y) positions as x@y. </p>
<p><strong>Step 1: </strong>Create a Form for drawing. I&#8217;m going to make an ImageMorph, which has an empty ColorForm as its image. The ColorForm is given a width and height based on various properties of the SparkLinePlot instance.<br />
<pre class="brush: plain;">
morph := (ImageMorph new) openInWorld.
morph isOpaque: false.
morph image: (ColorForm extent: (((data size) + 2) * (pointSpace))@(height * 2) depth: 8).
</pre></p>
<p><strong>Step 2: </strong> Prepare a few variables for use. x and y are going to refer to the (x,y) coordinates of each point, while scale is going to be multiplied against each data point to &#8220;shrink&#8221; the data to fit into the desired&#8230;well, scale.<br />
<pre class="brush: plain;">
scale := (height) / (data range).
x := y := 0.
</pre></p>
<p><strong>Step 3: </strong> Next, we&#8217;re going to make a Pen object that&#8217;s going to draw the lines for us. Pen objects are remarkably simple to operate: just create one and move it around with the place:, go:, and goto: messages (e.g. &#8220;pen goto: 4@4&#8243;). The place: method doesn&#8217;t draw lines on its way, so it&#8217;s good for initial positioning.</p>
<p><pre class="brush: plain;">
pen := (Pen newOnForm: (morph image)) defaultNib: lineWidth.
pen place: x@y.
</pre></p>
<p><strong>Step 4: </strong> Finally, we get the pen to draw! The do: message iterates over a collection, calling the associated block once per item in the collection (That is to say, the block runs once per item in the collection, each time setting the variable &#8220;dp&#8221; to be equal to that item). The y variable is negated because, in Squeak, positive y is down.</p>
<p><pre class="brush: plain;">
data do: [:dp |
		y := height + ((dp * scale) negated).
		(x = 0) ifFalse: [pen goto: x@y] ifTrue: [pen place: x@y].
		x := x + pointSpace.]
</pre></p>
<p><strong> Step 5: </strong> Let&#8217;s make this plot pretty. I want to see a little indicator where the max data point is, and maybe even have it change colors from positive to negative. Not so hard! Inside the &#8220;data do: []&#8221; block, we could add stuff so it looks like the following:</p>
<p><pre class="brush: plain;">
data do: [:dp |
	y := height + ((dp * scale) negated).
	(x = 0) ifFalse: [pen goto: x@y] ifTrue: [pen place: x@y].
	(dp = data max) ifTrue: [ pen color: Color yellow lighter.
		                         pen goto: (x + (lineWidth * 2))@
                                                       (y - (lineWidth * 2)).
					 pen goto: (x - (lineWidth * 2))@
                                                       (y - (lineWidth * 2)).
					 pen place: x@y.].
	(dp &gt;= 0) ifTrue: [pen color: colorPositive]
			 ifFalse: [pen color: colorNegative].
	x := x + pointSpace.]
</pre></p>
<p>Of course, all this stuff, the meat of the sparkline-generation, is wrapped up in a message called drawPlot. The message belongs to SparkLinePlot, a class that provides storage for variables and some convenience messages. </p>
<p>The point of having a SparkLinePlot class is that you can be both succinct:<br />
<pre class="brush: plain;">
plot := SparkLinePlot newWithData #(1 2 3 4 3 2 1 4 4).
plot drawPlot.
</pre><br />
Or specific:<br />
<pre class="brush: plain;">
plot := SparkLinePlot newWithData #(1 2 3 4 3 2 1 4 4).
plot height: 10; negativeColor: Color black; lineWidth: 2; pointSpace: 20.
plot drawPlot.
</pre></p>
<p>One final note: These sparklines are created &#8220;in the world&#8221;: they just pop into being in the Squeak window alongside your code. However, you can drag them around and stuff, and if you right-click on them, you can export them into various image formats including JPEG and PNG.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/moardataz.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/moardataz.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/moardataz.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/moardataz.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/moardataz.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/moardataz.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/moardataz.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/moardataz.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/moardataz.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/moardataz.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/moardataz.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/moardataz.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/moardataz.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/moardataz.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=93&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://moardataz.wordpress.com/2010/02/17/fun-with-squeak-sparklines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c61e15ed5d4592b07e6d997caa3cbb7d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">killercoffee</media:title>
		</media:content>
	</item>
		<item>
		<title>Oops</title>
		<link>http://moardataz.wordpress.com/2010/02/16/oops/</link>
		<comments>http://moardataz.wordpress.com/2010/02/16/oops/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 02:10:49 +0000</pubDate>
		<dc:creator>killercoffee</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://moardataz.wordpress.com/?p=85</guid>
		<description><![CDATA[Well, I just noticed that wordpress has pretty syntax highlighting, not just the HTML UGH CODE tag. I went back and changed the last few posts, but I&#8217;m not going to go all the way back. Sorry! Also, I ran into a problem: I say that if you don&#8217;t like the site design, you should [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=85&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well, I just noticed that wordpress has pretty syntax highlighting, not just the HTML UGH CODE tag. I went back and changed the last few posts, but I&#8217;m not going to go all the way back. Sorry!</p>
<p><pre class="brush: ruby;">
class SourceCode
    attr_accessor :sexiness
    def make_pretty(are_you_sure)
        if are_you_sure == 'yes'
            self.sexiness += 99999
        end
    end
end
</pre></p>
<p>Also, I ran into a problem: I say that if you don&#8217;t like the site design, you should subscribe to <a href="http://moardataz.wordpress.com/feed/">my RSS feed</a>. However, it turns out that <i>I</i> didn&#8217;t like the site design. Since I have to look at it a lot, I changed it! Sorry!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/moardataz.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/moardataz.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/moardataz.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/moardataz.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/moardataz.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/moardataz.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/moardataz.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/moardataz.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/moardataz.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/moardataz.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/moardataz.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/moardataz.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/moardataz.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/moardataz.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=85&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://moardataz.wordpress.com/2010/02/16/oops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c61e15ed5d4592b07e6d997caa3cbb7d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">killercoffee</media:title>
		</media:content>
	</item>
		<item>
		<title>Fun With Squeak: Stack Overflow Parser!</title>
		<link>http://moardataz.wordpress.com/2010/02/16/fun-with-squeak-stack-overflow-parser/</link>
		<comments>http://moardataz.wordpress.com/2010/02/16/fun-with-squeak-stack-overflow-parser/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 02:04:58 +0000</pubDate>
		<dc:creator>killercoffee</dc:creator>
				<category><![CDATA[Dataz Collection]]></category>
		<category><![CDATA[Squeak Smalltalk]]></category>

		<guid isPermaLink="false">http://moardataz.wordpress.com/?p=67</guid>
		<description><![CDATA[The first thing I did when I started with Squeak was to see if I could program a nice interface for parsing Stack Overflow data. I&#8217;ve tried before, with various languages, but Ruby was way too slow and Clojure&#8217;s interface to SAX seemed&#8230;pretty difficult, for some reason. Would Smalltalk be any different/easier? Yes (both different [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=67&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The first thing I did when I started with Squeak was to see if I could program a nice interface for parsing <a href="http://blog.stackoverflow.com/category/cc-wiki-dump/">Stack Overflow data</a>. I&#8217;ve tried before, with various languages, but Ruby was way too slow and Clojure&#8217;s interface to <a href="http://www.saxproject.org/">SAX</a> seemed&#8230;pretty difficult, for some reason. Would Smalltalk be any different/easier?</p>
<p>Yes (both different and easier). Well&#8230;the parser was easier, anyways. I made my own subclass of the SAXHandler class, and gave it a message for collecting data from each element:<br />
<pre class="brush: plain;">startElement: elementName attributeList: attributeList
(elementName = 'row')
ifTrue: [self saveAttributes: attributeList]
ifFalse: [Transcript show: 'Parsed &quot;', elementName, '&quot; is not a  element. Skipping.'; cr</pre></p>
<p>Then, I defined a saveAttributes message (so I don&#8217;t have to rewrite too much if I want to find different data later). I started out simply getting the reputations from all the people and putting them in a Bag: a dictionary that keeps a counter for each different item in it (so, if there are 5 1s, the bag would have a key &#8220;1&#8243; and value &#8220;5&#8243;):</p>
<p><pre class="brush: plain;">saveAttributes: attributeList
&quot;This method should be edited to provide proper searching for the desired attributes.&quot;
| foundData |
foundData := (attributeList at: 'Reputation') asNumber.
self data add: foundData.</pre></p>
<p>Note that &#8220;data&#8221; is a reference to an instance variable that was created as a Bag when an instance of the class is created. I took a while trying to figure out how to get this thing to actually <em>return</em> the bag so I could do stuff with it, and finally ended up rewriting the SAXHandler&#8217;s message parseDocumentFromFile: (I named it the much shorter parseFile:). I rewrote it so that it created the SAX driver and handler and started the parsing all in one function, and gave it a return statement, returning the data instance variable.</p>
<p><pre class="brush: plain;">parseFile: fileName
   | stream driver parser |
   stream := FileDirectory default readOnlyFileNamed: fileName.
   driver := SAXDriver on: stream.
   driver validating: true.
   parser := self new driver: driver.
   parser useNamespaces: false.
   parser startDocument.
   parser parseDocument.
   ^ parser data</pre><br />
Thus, I could assign the results of the message to something or other like so (in a workspace):</p>
<p><pre class="brush: plain;">aBag := StackOverflowParser parseFile: 'C:/dir/subdir/file.xml'.</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/moardataz.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/moardataz.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/moardataz.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/moardataz.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/moardataz.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/moardataz.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/moardataz.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/moardataz.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/moardataz.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/moardataz.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/moardataz.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/moardataz.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/moardataz.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/moardataz.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=67&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://moardataz.wordpress.com/2010/02/16/fun-with-squeak-stack-overflow-parser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c61e15ed5d4592b07e6d997caa3cbb7d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">killercoffee</media:title>
		</media:content>
	</item>
		<item>
		<title>Squeak Is Cool</title>
		<link>http://moardataz.wordpress.com/2010/02/15/squeak-is-cool/</link>
		<comments>http://moardataz.wordpress.com/2010/02/15/squeak-is-cool/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 22:35:48 +0000</pubDate>
		<dc:creator>killercoffee</dc:creator>
				<category><![CDATA[Squeak Smalltalk]]></category>

		<guid isPermaLink="false">http://moardataz.wordpress.com/?p=62</guid>
		<description><![CDATA[I have been pretty busy, but here I am again and I&#8217;m going to talk about a new programming language. I haven&#8217;t dumped Clojure, but my Linux installation is bothering me so I&#8217;m using Windows for the time being, and I lack the energy to try to set Clojure up. Instead, I&#8217;m trying a new [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=62&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been pretty busy, but here I am again and I&#8217;m going to talk about a new programming language. I haven&#8217;t dumped Clojure, but my Linux installation is bothering me so I&#8217;m using Windows for the time being, and I lack the energy to try to set Clojure up. Instead, I&#8217;m trying a new language: <a href="http://squeak.org/">Squeak Smalltalk</a>, since all I have to do is download a ZIP file, extract, and run for a full environment. I&#8217;ve never dipped my toes into Smalltalk before, but now that I have, I have to say: it&#8217;s pretty cool. The Squeak development environment is like the ultimate IDE ever. If you thought <a href="http://common-lisp.net/project/slime/">SLIME</a> was good, this will knock your socks off (knocked mine). I can&#8217;t really go into too much detail in this post, but I&#8217;m learning from a great, free online book called <a href="http://squeakbyexample.org/">Squeak by Example</a> that has a detailed description of the whole thing.</p>
<p>Squeak reminds me a lot of Ruby, although the syntax is quite different. Both languages are (extremely and completely) object-oriented, both languages have a lot of high-level commands (Squeak has more) and both languages make use of blocks (do&#8230;end in ruby, [...] in Squeak). Here are some standard expressions in Squeak and Ruby:<br />
<pre class="brush: plain;">Object method: [block].</pre><br />
<pre class="brush: plain;">Object.method {block}</pre><br />
<pre class="brush: plain;">#(1 2 3 4 5) do [ :n | Transcript show: (n * n); cr ].</pre><br />
<pre class="brush: plain;">[1, 2, 3, 4, 5].each do |n| puts(n*n) end</pre></p>
<p>However, Squeak has some interesting components that I don&#8217;t think Ruby has (If it does, it&#8217;s hidden from the programmer). For example, conditionals are actually messages (the equivalent of methods) to the Boolean class. If the object that they are called on returns the right boolean value (true or false), the conditionals execute the contents of a block. Example:<br />
<pre class="brush: plain;">(2 &amp;gt; 1) ifTrue: [Transcript show: 'Trueness!'].</pre><br />
You can chain them:<br />
<pre class="brush: plain;">(2 &amp;gt; 1) ifFalse: [Transcript show: 'I hope to God this never happens'] ifTrue: [Transcript show: 'Whew, math still works!'].</pre></p>
<p>Also, the periods at the end of the Squeak expressions are not accidental! Squeak ends expressions with &#8220;.&#8221; rather than &#8220;;&#8221;. Squeak doesn&#8217;t just generate variables like Ruby does, so you can&#8217;t go: &#8220;x = 1&#8243; out of the blue. However, Squeak does let you declare temporary variables in a succinct and unusual way:</p>
<p><pre class="brush: plain;">| x y |
x := 1
y := 2</pre></p>
<p>Anyways, that stuff isn&#8217;t even the weirdest or most interesting aspects of Squeak, but it&#8217;s simple to explain, so there you go. Squeak is weird, sure, and the development environment might at first seem irritating (why can&#8217;t I write everything in one file with my <a href="http://www.sublimetext.com/">favorite text editor</a>?) but quickly becomes one of the most awesome things about Squeak as you get to know it. Give it a try, it&#8217;s pretty cool.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/moardataz.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/moardataz.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/moardataz.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/moardataz.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/moardataz.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/moardataz.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/moardataz.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/moardataz.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/moardataz.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/moardataz.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/moardataz.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/moardataz.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/moardataz.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/moardataz.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=62&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://moardataz.wordpress.com/2010/02/15/squeak-is-cool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c61e15ed5d4592b07e6d997caa3cbb7d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">killercoffee</media:title>
		</media:content>
	</item>
		<item>
		<title>Functional Programming in Clojure: The Nature of the Beast</title>
		<link>http://moardataz.wordpress.com/2010/01/27/functional-programming-in-clojure-the-nature-of-the-beast/</link>
		<comments>http://moardataz.wordpress.com/2010/01/27/functional-programming-in-clojure-the-nature-of-the-beast/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 03:56:43 +0000</pubDate>
		<dc:creator>killercoffee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://moardataz.wordpress.com/?p=51</guid>
		<description><![CDATA[This tutorial series assumes a basic understanding of Clojure&#8217;s data types, syntax, etc. To learn about this stuff, check out here or here or the Clojure website. If you&#8217;re still here, very well. We shall learn together! Clojure is a functional programming language. What does that mean? It means that, like Haskell (for example), Clojure [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=51&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This tutorial series assumes a basic understanding of Clojure&#8217;s data types, syntax, etc. To learn about this stuff, check out <a href="http://java.ociweb.com/mark/clojure/article.html">here</a> or <a href="http://en.wikibooks.org/wiki/Learning_Clojure">here</a> or <a href="http://clojure.org/">the Clojure website</a>. If you&#8217;re still here, very well. We shall learn together!</p>
<p>Clojure is a functional programming language. What does that mean? It means that, like Haskell (for example), Clojure has immutable data structures. You can make a list or a vector or whatever, but you can&#8217;t change it later, only make another one. This raises lots of questions for people coming from an imperative programming background (C, C++, Ruby, Python, etc.): Wait! You mean I can&#8217;t change variables? How do I do my FOR loops?&nbsp;The problem with this thinking is that you can&#8217;t do your FOR loops. However, anything you could accomplish with those, you can still accomplish in a different way. Another major aspect of a functional programming languages are first-class functions, meaning that functions can be treated just like data. You can pass a function to a function as an argument with nary a whistle (And you will, believe me!)</p>
<p>Anyways, let&#8217;s talk about how a functional program looks. Generally, you define a bunch of functions, and then you use them in your main function that runs when the program is executed. In Clojure, you don&#8217;t really need a main function; just like in an imperative language, anything that isn&#8217;t a definition is just run right off, and the compiler just works its way down the file&#8230;but you should pretend that this doesn&#8217;t happen! Define as much as you can in functions, and then have a single, main function that executes your program. It&#8217;s the Functional Way. (If you must muck around with multiple-function mainloops, I suppose it won&#8217;t make stuff explode). Here&#8217;s an example:<br />
<code>(defn read-data-from-file [file]<br />
 ... ) ; returns the data that was read from the file.</code><br />
<code>(defn write-data-to-file [data, file]<br />
 ... ) ; returns...a 0, I guess. Doesn't much matter.</code><br />
<code>(defn mess-around-with-data [data]<br />
 ... ) ; returns the altered data</code><br />
<code>(write-data-to-file (mess-around-with-data (read-data-from-file "/home/lolcats"))) ;Main function (not wrapped in a defun)<br />
</code></p>
<p>This method of programming may look odd, or seem unmaintainable (You end up with one big function, I mean, geez. Big functions are bad) but in reality this sort of code is even more maintainable than imperative code. In fact, this is a major selling point of functional languages. I&#8217;m not going to push you too hard, though. If you don&#8217;t want to program functionally, then just don&#8217;t (or start practicing in a language that supports functional and imperative paradigms, like Common Lisp&#8230;or Perl). After all, it will only <a href="http://stackoverflow.com/questions/1168202/functional-programming-applied">make you a better programmer</a> and <a href="http://blip.tv/file/812787">make concurrent programming simpler</a>.</p>
<p>In future episodes of FPiC, I will describe some fun functions and tricks for functional programming. Don&#8217;t touch that&#8211;wait. The internet doesn&#8217;t have dials.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/moardataz.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/moardataz.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/moardataz.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/moardataz.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/moardataz.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/moardataz.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/moardataz.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/moardataz.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/moardataz.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/moardataz.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/moardataz.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/moardataz.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/moardataz.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/moardataz.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=51&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://moardataz.wordpress.com/2010/01/27/functional-programming-in-clojure-the-nature-of-the-beast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c61e15ed5d4592b07e6d997caa3cbb7d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">killercoffee</media:title>
		</media:content>
	</item>
		<item>
		<title>Quantifying My Ideal Movie</title>
		<link>http://moardataz.wordpress.com/2010/01/26/quantifying-my-ideal-movie/</link>
		<comments>http://moardataz.wordpress.com/2010/01/26/quantifying-my-ideal-movie/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 01:10:37 +0000</pubDate>
		<dc:creator>killercoffee</dc:creator>
				<category><![CDATA[Dataz Analysis]]></category>

		<guid isPermaLink="false">http://moardataz.wordpress.com/?p=45</guid>
		<description><![CDATA[In order to be able to complete one of my pet projects, a program that automatically recommends movies to me, I am trying to come up with a set of requirements for a movie to (probably) be one I will like. I&#8217;m thinking of using a points system; awarding points to movies for various aspects. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=45&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In order to be able to complete one of my pet projects, a program that automatically recommends movies to me, I am trying to come up with a set of requirements for a movie to (probably) be one I will like. I&#8217;m thinking of using a points system; awarding points to movies for various aspects. 100 points is the ideal goal. Negative points are possible.</p>
<p>To help me manage this rating system, I did what any sane person would do: I <a href="http://spreadsheets.google.com/pub?key=tUYcRVZHUpP5npyJO6DTKRA&amp;output=html">made a spreadsheet</a>. I currently have point measures for movie length, <a href="http://www.imdb.com/">IMDb</a> rating, and awards earned (Grammy, Oscar, and Golden Globe only!) I also assign bonus points based on genre, director, and actor. The way I&#8217;m exporting the spreadsheet doesn&#8217;t seem to let you view the formulas used, so I listed them next to the&#8211;well, you should just look at the spreadsheet.</p>
<p>In case you don&#8217;t, the biggest modifier is the movie&#8217;s IMDb rating, which is calculated by (rating &#8211; 5) * 15. Thus, it actually gives negative points if the movie is rated below 5! Harsh. I find ratings to be the biggest indicators of how good a movie is, so if a movie has a good IMDb rating (8.5 or more, say) it can get upwards of 50 points from the IMDb rating alone.</p>
<p>It currently seems to work well for movies at the high end of the spectrum (Inglorious Basterds, The Godfather), but for movies that are out of my usual action-adventure zone (such as Up in the Air) are rated too low, because I assign negative scores to Romance and Comedy categories. Maybe I&#8217;ll just have to find out about those types of movies myself.</p>
<p>I also plan on incorporating a <a href="http://en.wikipedia.org/wiki/Naive_Bayesian_classifier">Bayes classifier</a> to add or subtract points to my rating based on what it finds&#8230;but that&#8217;s pretty far into the future.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/moardataz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/moardataz.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/moardataz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/moardataz.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/moardataz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/moardataz.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/moardataz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/moardataz.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/moardataz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/moardataz.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/moardataz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/moardataz.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/moardataz.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/moardataz.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=moardataz.wordpress.com&amp;blog=11615343&amp;post=45&amp;subd=moardataz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://moardataz.wordpress.com/2010/01/26/quantifying-my-ideal-movie/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c61e15ed5d4592b07e6d997caa3cbb7d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">killercoffee</media:title>
		</media:content>
	</item>
	</channel>
</rss>
