<?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/"
	>

<channel>
	<title>Playing With Pointers &#187; Offline Bytes</title>
	<atom:link href="http://playingwithpointers.com/archives/category/offline-bytes/feed" rel="self" type="application/rss+xml" />
	<link>http://playingwithpointers.com</link>
	<description>&#34;The habit of expression leads to the search for something to express.&#34;</description>
	<lastBuildDate>Tue, 01 May 2012 09:50:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>TSA in the sky with diamonds</title>
		<link>http://playingwithpointers.com/archives/729</link>
		<comments>http://playingwithpointers.com/archives/729#comments</comments>
		<pubDate>Fri, 23 Mar 2012 10:34:19 +0000</pubDate>
		<dc:creator>Sanjoy</dc:creator>
				<category><![CDATA[Offline Bytes]]></category>
		<category><![CDATA[drugs]]></category>
		<category><![CDATA[kgp]]></category>
		<category><![CDATA[tsa]]></category>

		<guid isPermaLink="false">http://playingwithpointers.com/?p=729</guid>
		<description><![CDATA[An anti-drug article [1] was written and published by some IIT Kharagpur students in one of our campus newspapers. I think the article is rubbish and here's why. I think the article should, in principle, offend any self-respecting individual due to its tone and any rational person due to the "facts" it presents. From this [...]]]></description>
			<content:encoded><![CDATA[<p align="justify"><em>An anti-drug article [1] was written and published by some IIT Kharagpur students in one of our campus newspapers.  I   think the article is rubbish and here's why.</em></p>
<p align="justify">I think the article should, in principle, offend any self-respecting individual due to its tone and any rational person due to the "facts" it presents.  From this point on, I tacitly assume that people reading this anti-(anti-drug-rant) rant posses both   rationality and self-respect to some extent.</p>
<p align="justify">One interesting thing about the article is that after replacing "drug use" with "gay marriage" the reasons still remain "valid", and become strikingly similar to what anti-gay lobbyists routinely come up with.  The illegality of two men loving each other, the separation from normal society, "underground" gay groups and "the gateway effect".  One of the reasons routinely cited in support of anti-gay laws is that if we allow two women to marry, men will start sleeping with dogs and sisters will engage in incest.   Needless to say, such fears are as baseless as the gateway drug theory   [2] the authors talk about.</p>
<p align="justify">Perhaps the most objectionable aspect of this article the way the authors <em>instruct</em> their reader on the "right" way to lead their lives.  Whether someone spends their free time reading Shakespeare or worshipping bananas is entirely for themselves to decide.  Advice can only be given conditionally, "If you want to be an astronaut eating zombie then do the following ... ", or in this particular case "If you're giving advice to self-respecting people ...".  Unconditional advice speaks poorly of how the author view people around them even more poorly of TSA for publishing such an   article.</p>
<p align="justify">Getting down to the factual aspects:</p>
<p align="justify">It is true that most nations ban drugs, but more and more countries are taking steps towards legalization.  London [4] is re-thinking their drug laws and Portugal decriminalized drug use [5] over a decade ago.  In our own country we have licensed Bhang Shops [3].  Cocaine and heroin were both legal for several decades -- does it mean it was "okay" to use them back then?  The issue is, legality isn't always a good indicator of whether a particular activity is harmful or not.  Even practically, the only country I have heard of where such drug-laws are strictly enforced is the US of A, and I don't think the reader will need to be told that their notion of what to "fix" and what not to is a bit skewed.  Personally, no one in my social circle ever got into any legal trouble for smoking up   once in a while.</p>
<p align="justify">The authors mention legality again, and their argument is flawed for the reason already mentioned.  Going by this logic, DC++, anything but regular sex, homosexuals (in West Bengal)  should all be avoided.</p>
<p align="justify">Keeping secrets from some people is not the same as getting disowned from society.  Moreover, people choose friends and social circles based on their opinions, not the other way   around</p>
<p align="justify">You can't vote in this country if you mind sponsoring corruption. :) Plus, at least in West Bengal, marijuana is grown locally by extremely poor people.  If anything, by buying pot you're ensuring they have enough to eat for a day.</p>
<p align="justify">I agree with the authors on <em>one</em> thing and one thing only -- presenting a distorted picture of drug use, mentioning the good while leaving out the bad and risky is never ethical.  In fact, I find this article unethical for doing the exact opposite, which is just as   bad.</p>
<p align="justify">Fact is, however the authors try to pretend to be omniscient beings who transcend time and space, they're are just like the readers they're trying to advise and I don't think they know any better.  People have a right to choose what they do with their lives; giving out unsolicited advice is vulgar and  revolting.</p>
<p align="justify">Does this mean I condone drug usage?  Well, it doesn't matter what I think.  Drugs can ruin your life, be the most meaningful experience you take out of this phase of your life or just something you do once in a while.  Your life is yours to make and   destroy, and I don't get a say in it.</p>
<p align="justify">PS: This isn't a personal attack against anyone.<br />
<br />PPS: I don't contribute to any multiple-continent-spanning newspaper.</p>
<p>--</p>
<p>[1] <a href="http://www.scholarsavenue.org/2012/03/17/an-open-letter/">http://www.scholarsavenue.org/2012/03/17/an-open-letter/</a><br />
[2] <a href="http://en.wikipedia.org/wiki/Gateway">http://en.wikipedia.org/wiki/Gateway</a><br />
[3] <a href="http://en.wikipedia.org/wiki/Bhang">http://en.wikipedia.org/wiki/Bhang</a><br />
[4] <a href="http://www.telegraph.co.uk/news/uknews/law-and-order/4581743/Now-Home-Office-drugs-adviser-wants-to-downgrade-LSD-from-A-to-B.html">http://www.telegraph.co.uk/news/uknews/law-and-order/4581743/Now-Home-Office-drugs-adviser-wants-to-downgrade-LSD-from-A-to-B.html</a><br />
[5] <a href="http://www.huffingtonpost.com/2011/07/03/portugal-drug-laws-decriminalization-_n_889531.html">http://www.huffingtonpost.com/2011/07/03/portugal-drug-laws-decriminalization-_n_889531.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://playingwithpointers.com/archives/729/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>[Proof] λ→ is normalizing</title>
		<link>http://playingwithpointers.com/archives/690</link>
		<comments>http://playingwithpointers.com/archives/690#comments</comments>
		<pubDate>Tue, 28 Feb 2012 16:21:20 +0000</pubDate>
		<dc:creator>Sanjoy</dc:creator>
				<category><![CDATA[Digital Dope]]></category>
		<category><![CDATA[Offline Bytes]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[programming language theory]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[types]]></category>

		<guid isPermaLink="false">http://playingwithpointers.com/?p=690</guid>
		<description><![CDATA[I studied a proof today that I had been putting off for some time now; that a simply typed lambda calculus is normalizing -- every well-typed expression eventually reduces to a value. The proof is quite clever and that the exact wording of the proof in Types and Programming Languages is a bit terse so [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">I studied a proof today that I had been putting off for some time now; that a simply typed lambda calculus is normalizing -- every well-typed expression eventually reduces to a value.  The proof is quite clever and that the exact wording of the proof in <em>Types and Programming   Languages</em> is a bit terse so I think it will make for a good, juicy blog post.</p>
<p align="justify">In case you haven't already, you need to first read up (a little bit) on untyped and typed lambda calculus.  Try reading to the point where you can comfortably state why <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_cff40dd2d5b0f1bd4274511668d7fbda.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" \lambda x \cdot x x " /></span><script type='math/tex'> \lambda x \cdot x x </script> can not be well-typed.  I'll wait right here, I promise. :)</p>
<p align="justify">I'll use the symbol <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_8a8fecd1b89546843c402c2d2d3a7050.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" [x \mapsto s] t " /></span><script type='math/tex'> [x \mapsto s] t </script> to mean "replace instances of <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_6722c218a6f30869ef6886dc4b050a37.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=" x " /></span><script type='math/tex'> x </script> by <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_793d6602f044affad0290fdc4f61ce36.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=" s " /></span><script type='math/tex'> s </script> in the term <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_2f76c9194ebc4dbee0c1614dbdfa3c25.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" t " /></span><script type='math/tex'> t </script>".  We'll talk about a typed lambda calculus which has exactly one type <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_951196ca354c5c72b8356494f97c3b5d.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" A " /></span><script type='math/tex'> A </script>   and only one value of that type, <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_e49736f09a17efd3daec360132426f43.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=" a " /></span><script type='math/tex'> a </script>.  We'll evaluate in normal order.</p>
<p align="justify">Firstly, note (informally) that all types will look like <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_e044410d710ae523902d0fd9d6241aeb.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" ((A \to A) \to (A \to A)) \to (A \to A) " /></span><script type='math/tex'> ((A \to A) \to (A \to A)) \to (A \to A) </script>.  It is not hard to see (or prove) that the set of types is isomorphic to a set of binary trees with every internal node a <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_6e748544e55cb51c43b00855b1bcb0ec.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" \to " /></span><script type='math/tex'> \to </script> and every leaf an <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_951196ca354c5c72b8356494f97c3b5d.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" A " /></span><script type='math/tex'> A </script>.  This is important since we'll do structural induction on the binary   tree corresponding to a type.</p>
<p align="justify">We now define a set of what are usually called reducibility candidates.  They are a predicate on terms of the lambda   calculus with the following conditions</p>
<ul>
<li><span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_8d606bfa8e461091ec7cdb0530a8ae6a.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_{A}(t) " /></span><script type='math/tex'> R_{A}(t) </script> if <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_2f76c9194ebc4dbee0c1614dbdfa3c25.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" t " /></span><script type='math/tex'> t </script> halts.</li>
<li><span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_5dcfbd4bd5ab5d1945179b623e8b3611.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_{T_{1} \to T_{2}}(t) " /></span><script type='math/tex'> R_{T_{1} \to T_{2}}(t) </script> <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_de1321be4dc7de01ce8599103bec8fce.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" \iff " /></span><script type='math/tex'> \iff </script> <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_2f76c9194ebc4dbee0c1614dbdfa3c25.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" t " /></span><script type='math/tex'> t </script> halts and <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_fdfd4060ae8ba2eca38fade94b9444b5.gif' style='vertical-align: middle; border: none; ' class='tex' alt="     R_{T_{1}}(s) \Rightarrow R_{T_{2}}(t s) " /></span><script type='math/tex'>     R_{T_{1}}(s) \Rightarrow R_{T_{2}}(t s) </script></li>
</ul>
<p align="justify">Since <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_3bcf3dbb506487c9de1eb167791ff8a7.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_T " /></span><script type='math/tex'> R_T </script> is a predicate, we can safely say   things like <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_6722c218a6f30869ef6886dc4b050a37.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=" x " /></span><script type='math/tex'> x </script> is <em>in</em> <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_9708f55875aa1b4739a39e08f72e7391.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_A " /></span><script type='math/tex'> R_A </script> etc.</p>
<p align="justify">We aim to prove the following</p>
<ol>
<li>Every term in a set <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_9682275743feffecc76263b18b3fa4ad.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_{T} " /></span><script type='math/tex'> R_{T} </script> (for any type <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_39300282214603edc7b46a69b156bdcb.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" T " /></span><script type='math/tex'> T </script>) is normalizable.  Note that this follows from the definition of the     reducibility candidates</li>
<li>Every term of type <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_39300282214603edc7b46a69b156bdcb.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" T " /></span><script type='math/tex'> T </script> is in <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_9682275743feffecc76263b18b3fa4ad.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_{T} " /></span><script type='math/tex'> R_{T} </script>.</li>
</ol>
<p align="justify">These two, combined, will allow us to draw the conclusion that every well-typed term in our simply typed lambda   calculus halts.</p>
<p align="justify"><strong>Lemma 0: Every term in a reducibility     candidate halts</strong></p>
<p align="justify">This follows directly from the definition of a   reducibility candidate.</p>
<p align="justify"><strong>Lemma 1: Reduction does not change the     reducibility status of   a term</strong></p>
<p align="justify">Formally, we try to prove <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_7909e8ceb006d3647b0f06c075b95dbd.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_T(t) \wedge (t \to t') \iff R_T(t') " /></span><script type='math/tex'> R_T(t) \wedge (t \to t') \iff R_T(t') </script>.  For this, we use the structural induction on binary trees isomorphic to each type we talked about above.  There are two cases.</p>
<p align="justify"><u>T is the atom type</u></p>
<p align="justify">This is the <em>base case</em> for our       induction and also pretty obvious.  From <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_987276d257ba2e0b7f013d0d14b035f5.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t \to t' " /></span><script type='math/tex'> t \to t' </script> we conclude <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_2f76c9194ebc4dbee0c1614dbdfa3c25.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" t " /></span><script type='math/tex'> t </script> halts iff <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_0a7a99751a9fd52baeebd2999e922979.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t' " /></span><script type='math/tex'> t' </script> halts.  Since the only condition to be in <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_9708f55875aa1b4739a39e08f72e7391.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_A " /></span><script type='math/tex'> R_A </script> is halting, <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_b02099af2f120f0c96bf1683ced18413.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_A(t) \iff R_A(t') " /></span><script type='math/tex'> R_A(t) \iff R_A(t') </script>.</p>
<p align="justify"><u>T is a function type</u></p>
<p align="justify">Let <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_d1c91a16eb1b97390adea6bd1b56163c.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" T \equiv T_1 \to T_2 " /></span><script type='math/tex'> T \equiv T_1 \to T_2 </script>.  In this case, each <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_0a7a99751a9fd52baeebd2999e922979.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t' " /></span><script type='math/tex'> t' </script> has to satisfy the additional condition <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_729b60702e51388ae5ca4589157b286e.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" \forall s \in R_{T_1} \cdot R_{T_2}(t'\;s)   " /></span><script type='math/tex'> \forall s \in R_{T_1} \cdot R_{T_2}(t'\;s)   </script>.  We begin by taking an arbitrary <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_793d6602f044affad0290fdc4f61ce36.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=" s " /></span><script type='math/tex'> s </script> in <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_392b3f6003a41541ec5649e8a6203d77.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_{T_1} " /></span><script type='math/tex'> R_{T_1} </script>.</p>
<p align="justify">Notice how <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_b127bd2421ef2c59acd07a621f9311f2.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t \; s \to t' \; s " /></span><script type='math/tex'> t \; s \to t' \; s </script> [1]?  Also notice how <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_2b2ab5d721bf76536fa5fbd981a975a4.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" T_2 " /></span><script type='math/tex'> T_2 </script> is a substructure of <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_94cd26c79ad2ef54ab5d91445d9440bc.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" T \equiv (T_1 \to T_2) " /></span><script type='math/tex'> T \equiv (T_1 \to T_2) </script>?  We can invoke structural induction here and say we already know <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_c02d930af1842dedba9988a034687505.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_{T_2}(t \; s) \Rightarrow R_{T_2}(t' \; s) " /></span><script type='math/tex'> R_{T_2}(t \; s) \Rightarrow R_{T_2}(t' \; s) </script> (<em>statement 0</em>).  Also, since we're given <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_016678743a8c28a1922bde6d921a350b.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_T(t) " /></span><script type='math/tex'> R_T(t) </script>, we know for all <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_793d6602f044affad0290fdc4f61ce36.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=" s " /></span><script type='math/tex'> s </script> in <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_392b3f6003a41541ec5649e8a6203d77.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_{T_1} " /></span><script type='math/tex'> R_{T_1} </script>, <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_bcac02c9ccb7f067c92569a3bdafbab2.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" t \; s " /></span><script type='math/tex'> t \; s </script> is in <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_e2a3692ec0c0f4510c7b12f7075baec8.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_{T_2} " /></span><script type='math/tex'> R_{T_2} </script> (property of <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_3bcf3dbb506487c9de1eb167791ff8a7.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_T " /></span><script type='math/tex'> R_T </script>) (<em>statement 1</em>).  We can conclude from <em>statement 0</em> and <em>statement 1</em> that for any arbitrary <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_793d6602f044affad0290fdc4f61ce36.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=" s " /></span><script type='math/tex'> s </script> in <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_392b3f6003a41541ec5649e8a6203d77.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_{T_1} " /></span><script type='math/tex'> R_{T_1} </script>, we have <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_ac3f0219654b9716608d2bec354e5cbd.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_{T_2} (t' \; s) " /></span><script type='math/tex'> R_{T_2} (t' \; s) </script>.  This is the extra condition we needed to show <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_0a7a99751a9fd52baeebd2999e922979.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t' " /></span><script type='math/tex'> t' </script> is in <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_3bcf3dbb506487c9de1eb167791ff8a7.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_T " /></span><script type='math/tex'> R_T </script>.</p>
<p align="justify"><strong>Lemma 2: Every well typed term of type T is     in <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_3bcf3dbb506487c9de1eb167791ff8a7.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_T " /></span><script type='math/tex'> R_T </script> </strong></p>
<p align="justify">This is proved by proving a stronger assertion: if <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_0edac9bb7099e78c0a266ac339850ac8.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" x_1:T_1, ..., x_n:T_n \vdash t \; : \; T " /></span><script type='math/tex'> x_1:T_1, ..., x_n:T_n \vdash t \; : \; T </script> and <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_62d2c5ebab4d9bd525e0a5ef0aa4ae4d.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" \emptyset \vdash v_i : T_i " /></span><script type='math/tex'> \emptyset \vdash v_i : T_i </script> for all <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_72f8ab13f56f855e098e0ea6e73251c1.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" i " /></span><script type='math/tex'> i </script> then <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_b3d67e7988c42580add445fed8efbe57.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_T([x_1 \mapsto v_1] ... [x_n   \mapsto v_n]t) " /></span><script type='math/tex'> R_T([x_1 \mapsto v_1] ... [x_n   \mapsto v_n]t) </script>.  This is a stronger assertion because this also   applies to terms with free variables while, at the <em>top level</em>, we'll need to consider only closed terms.  The assertion will be invoked on open terms only via induction.</p>
<p align="justify">To prove this assertion, we'll invoke induction on the <em>size</em> of a term.  So, informally, <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_ae1771ca9e96c66ef89666c9a4b09089.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t_1 \; t_2 " /></span><script type='math/tex'> t_1 \; t_2 </script> is   greater than either <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_f79826c4b070ff558ed05090af42a4fe.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t_1 " /></span><script type='math/tex'> t_1 </script> or <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_3f03acdbd3d49d286e819fd28b8023a7.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t_2 " /></span><script type='math/tex'> t_2 </script> and <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_4c276e2086089f622d2ba77beec9a544.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" \lambda a \cdot x " /></span><script type='math/tex'> \lambda a \cdot x </script> is greater than <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_6722c218a6f30869ef6886dc4b050a37.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=" x " /></span><script type='math/tex'> x </script>.  We make a case by case analysis on the various forms <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_2f76c9194ebc4dbee0c1614dbdfa3c25.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" t " /></span><script type='math/tex'> t </script> can be in</p>
<p align="justify"><u>A variable</u></p>
<p align="justify">This is obvious, since <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_916a548c09eec5d99e6137cbdee46057.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t = x_i " /></span><script type='math/tex'> t = x_i </script> for some <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_72f8ab13f56f855e098e0ea6e73251c1.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" i " /></span><script type='math/tex'> i </script>.</p>
<p align="justify"><u>An application</u></p>
<p align="justify">This too is easy.  Since <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_05640c3a603587d0c0efe71f27774c37.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t \equiv t_1 \; t_2 " /></span><script type='math/tex'> t \equiv t_1 \; t_2 </script>, we invoke induction on <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_f79826c4b070ff558ed05090af42a4fe.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t_1 " /></span><script type='math/tex'> t_1 </script> and <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_3f03acdbd3d49d286e819fd28b8023a7.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" t_2 " /></span><script type='math/tex'> t_2 </script> separately and then use  <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_25782625a309e8caf2ed9dc55b64158e.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" ([a \mapsto b]c) ([a \mapsto b]d) \equiv ([a \mapsto b] (c \; d)) " /></span><script type='math/tex'> ([a \mapsto b]c) ([a \mapsto b]d) \equiv ([a \mapsto b] (c \; d)) </script> to get our result.</p>
<p align="justify"><u>An abstraction</u></p>
<p align="justify">We know, from its form that <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_2f76c9194ebc4dbee0c1614dbdfa3c25.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" t " /></span><script type='math/tex'> t </script> is a  value.  The other thing left to prove is that, keeping types compatible, <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_c4a8b1ac47ba0a32b0a005bbb19c046c.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" \forall s \in R_S \cdot R_M(t \; s) " /></span><script type='math/tex'> \forall s \in R_S \cdot R_M(t \; s) </script>.  <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_2f76c9194ebc4dbee0c1614dbdfa3c25.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" t " /></span><script type='math/tex'> t </script> is of the form <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_df783232fa2bc2a15eef03cd94225dc6.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" \lambda x : S \cdot b " /></span><script type='math/tex'> \lambda x : S \cdot b </script>.  Let <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_640eab5a602373c658013fd743d6ad72.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" s \in R_S " /></span><script type='math/tex'> s \in R_S </script>.  We know, from lemma 0 that <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_793d6602f044affad0290fdc4f61ce36.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=" s " /></span><script type='math/tex'> s </script> will reduce to a value <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_c4f4b9b0ab0a2eb771bf7decb3a53c8d.gif' style='vertical-align: middle; border: none; padding-bottom:2px;' class='tex' alt=" v " /></span><script type='math/tex'> v </script>.  From lemma 1, we get <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_e983cda19a160270362bc6f3f4b32067.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_S(v) " /></span><script type='math/tex'> R_S(v) </script>.  The condition we're trying to prove is <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_8c84669ebaaa780cd171e24e4dd9dc4a.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" ([x_1 \mapsto v_1]...[x_n \mapsto v_n]t)s \in R_P " /></span><script type='math/tex'> ([x_1 \mapsto v_1]...[x_n \mapsto v_n]t)s \in R_P </script>.  But this beta-reduces to <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_b6c12a13aa473c9eb458ce100398d58e.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" ([x_1 \mapsto v_1]...[x_n \mapsto v_n](t \; s)) " /></span><script type='math/tex'> ([x_1 \mapsto v_1]...[x_n \mapsto v_n](t \; s)) </script> <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_6e748544e55cb51c43b00855b1bcb0ec.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" \to " /></span><script type='math/tex'> \to </script> <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_df1cc77bff04eb9ab47d35cbc8dbeb07.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" ([x_1 \mapsto v_1]...[x_n \mapsto v_n](t \; v)) " /></span><script type='math/tex'> ([x_1 \mapsto v_1]...[x_n \mapsto v_n](t \; v)) </script> <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_6e748544e55cb51c43b00855b1bcb0ec.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" \to " /></span><script type='math/tex'> \to </script> <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_34ff311ffbfadc3b79587b7404fdf78f.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" ([x_1 \mapsto v_1]...[x_n \mapsto v_n]([x \mapsto v]b) " /></span><script type='math/tex'> ([x_1 \mapsto v_1]...[x_n \mapsto v_n]([x \mapsto v]b) </script>.  <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_301d251459701f60c27be3229f1c4122.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=" b " /></span><script type='math/tex'> b </script> is a <em>smaller</em> term satisfying the requirements for this proposition, and we can say, via induction, <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_b1dacdb650daec4824294730e2243a45.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_P([x_1 \mapsto v_1]...[x_n \mapsto v_n]([x \mapsto v]b) " /></span><script type='math/tex'> R_P([x_1 \mapsto v_1]...[x_n \mapsto v_n]([x \mapsto v]b) </script>.  From lemma 1 we get <span class='MathJax_Preview'><img src='http://playingwithpointers.com/wp-content/plugins/latex/cache/tex_998e25d68247b6bb6fb5764eac755642.gif' style='vertical-align: middle; border: none; ' class='tex' alt=" R_P(([x_1 \mapsto v_1]...[x_n \mapsto   v_n]t)s) " /></span><script type='math/tex'> R_P(([x_1 \mapsto v_1]...[x_n \mapsto   v_n]t)s) </script>, which is what we wanted to prove.</p>
<p align="justify">--</p>
<ol>
<li>In normal order.  I haven't tried proving this in other evaluation strategies but I think I can go around by proving that the evaluation strategy does not matter in deciding the behaviour of a         program in this lambda calculus.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://playingwithpointers.com/archives/690/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Books, movies and music</title>
		<link>http://playingwithpointers.com/archives/669</link>
		<comments>http://playingwithpointers.com/archives/669#comments</comments>
		<pubDate>Thu, 02 Feb 2012 11:36:32 +0000</pubDate>
		<dc:creator>Sanjoy</dc:creator>
				<category><![CDATA[Offline Bytes]]></category>

		<guid isPermaLink="false">http://playingwithpointers.com/?p=669</guid>
		<description><![CDATA[I graduated out of high school an idiot. I hadn't read anything, seen anything or heard anything (Everybody anyone?). Now that I'm becoming moderately literate in such things, I think I can make a generalization -- the information content (sorry Dr. Shannon, I'm going to abuse that term here) of an art form is inversely [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">I graduated out of high school an idiot.  I hadn't read anything, seen anything or heard anything (<em>Everybody</em> anyone?).  Now that I'm becoming moderately literate in such things, I think I can make a generalization -- the information content (sorry Dr. Shannon, I'm going to abuse that term here) of an art form is   inversely proportional to the effect it has on me.</p>
<p align="justify">Contrast a book with a movie, for instance.  The information a book contains is certainly more abstract than the information a movie rams into my head.  I don't know how <em>Naoko</em> in <em>Norwegian Wood</em> looked like but <em>Martha</em> always conjures up the image of Helena Bontham Carter in a hat, smoking a freshly lit cigarette.   <em>Naoko</em>'s image is malleable and ethereal but <em>Martha</em> will always be a dark girl with curly hair (this is not to criticize <em>Fight Club</em>, I loved the movie).</p>
<p align="justify">I think this makes books more relatable, and a well written text hits me at a very base level.  Since the written word is so flexible and abstract, my mind can lift it up to a concrete representation that is very close to my sense of self.  A book can drive me to insanity, a movie cannot.</p>
<p align="justify">I think the same applies to music too -- I've always found solos by  <em>Pink Floyd</em> their most interesting work.  When a rapper talks about how he scored last night, there is only so much information my mind can add, there is only so much I can misinterpret.  When I hear the crazy slide-guitar in <em>Shine on you crazy diamond, VI-IX</em>, my mind is forced to conjure up something using the only tools it has at its disposal, my imagination and my experience.  And it always comes   up with something sinister.</p>
]]></content:encoded>
			<wfw:commentRss>http://playingwithpointers.com/archives/669/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Abstraction, Death of Nihilism and The Human Experience</title>
		<link>http://playingwithpointers.com/archives/580</link>
		<comments>http://playingwithpointers.com/archives/580#comments</comments>
		<pubDate>Sun, 18 Sep 2011 22:15:42 +0000</pubDate>
		<dc:creator>Sanjoy</dc:creator>
				<category><![CDATA[Offline Bytes]]></category>

		<guid isPermaLink="false">http://playingwithpointers.com/?p=580</guid>
		<description><![CDATA[One way of looking at how human beings behave is to talk about our basic desires (food, sex and power) and how they manifest themselves as complex behaviour. The reason the rich guy helped the poor guy is because that helps him demonstrate power, which increases his chances of getting laid. The engineer builds bridges [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">
One way of looking at how human beings behave is to talk about our basic desires (food, sex and power) and how they manifest themselves as complex behaviour.  The reason the rich guy helped the poor guy is because that helps him demonstrate power, which increases his chances of getting laid.  The engineer builds bridges to impress men (see how cleverly I spliced in that the engineer is either a woman or gay -- these things help keep my blog politically correct) and the doctor refuses to perform cosmetic surgery (again, more political correctness) because he thinks when the word gets around, he'll get some extra action.  Now, however incredulous my tone may sound, I think this way of looking at things is quite accurate; I believe we <strong>do</strong> have a certain set of basic instincts that guide our actions.  But I disagree on whether this is a useful way to reason about people.  I don't think it is.  Not because it isn't true (it probably is), but because more complex behaviour may exist at higher levels of abstraction.
</p>
<p align="justify">
For instance, I could argue about how we all are automatons driven solely by the desire to increase the entropy of the universe.  Not a very useful way to discuss why A's marriage did not work out, is it?  I find it more useful to look at human beings as a reflection of their line of existence through time and place.  This way, I treat a person not as someone (or something) contained in the physical realms of his or her body; but as a context that spreads out in time and space.  The coffee he's drinking is changing his mood, why should it not be as much "him" as his tonsils?  How about the kindergarten school she went too?  Is that not as much "her" as her retina?  How about the book she's reading?  This way of thinking about people is very rewarding (I personally think so) -- it allows me to be more compassionate, understanding and patient.  Once the object of your frustration is no longer a sharply defined physical entity, things start to diffuse and you begin thinking more clearly.
</p>
<p align="justify">
As a result of this <em>context</em> (spatial and temporal) which everyone carries around, we have certain goals, aspirations and biases.  That is, what I think, makes us human.
</p>
<p align="justify">
I have had arguments with my peers on things like whether it is better to live comfortably without free speech and liberty or to live without material comfort surrounded by intellectual freedom.  But such arguments are probably too restrictive -- maybe the North Koreans are actually happy!  Perhaps they [2] really <em>do</em> think that their dear leader is divine.  Maybe is isn't some mass cognitive dissonance after all?  I find their condition desolate and pitiful because I am carrying around this huge bag full of <strong>my own</strong> context, which I shamelessly dump on them.  What is it really, to think in someone else's shoes?  Can I <em>possibly</em> think like a unwanted child born to a prostitute in a Bombay slum?  My personal rationality is biased, more so when applied to analyzing others.
</p>
<p align="justify">
It seems to me that everyone, on account of the biases in their rationality and the inherent context they carry, tend to distort their world in their own unique way, by reflecting themselves off a mirror that isn't really perfect and by looking at others through tainted glass.  But then how <em>do</em> you reason about the flaws in your rationality using your flawed rationality?  Maybe this, the dents in our looking glasses, is the human experience.  Perhaps without it the world would be a very boring place.
</p>
<p align="justify">
I still maintain that our existence, at the very base level, is purposeless and incidental.  But I now have something shiny to look forward to -- the human experience; something that can not be dissected, explained and thrown away.
</p>
<p align="justify">
  <em>Thanks to all those who disagreed, those who still do, chai and Albert Hofmann.</em>
</p>
<p>[1] http://www.edge.org/3rd_culture/eagleman09/eagleman09_index.html<br />
[2] I'm talking about the majority here -- some people do try to escape.</p>
]]></content:encoded>
			<wfw:commentRss>http://playingwithpointers.com/archives/580/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Young Lust</title>
		<link>http://playingwithpointers.com/archives/557</link>
		<comments>http://playingwithpointers.com/archives/557#comments</comments>
		<pubDate>Mon, 15 Aug 2011 12:55:19 +0000</pubDate>
		<dc:creator>Sanjoy</dc:creator>
				<category><![CDATA[Offline Bytes]]></category>

		<guid isPermaLink="false">http://playingwithpointers.com/?p=557</guid>
		<description><![CDATA[One of the track in The Wall is Young Lust. Brilliant guitaring apart, the track talks about how the protagonist (Pink) wants a dirty woman and a dirty girl. On a first glance, this looks unlike most other Pink Floyd songs. Why, then, does this track exist? I think, it is connected to a previous [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">
One of the track in <em>The Wall</em> is <em>Young Lust</em>. Brilliant guitaring apart, the track talks about how the protagonist (Pink) wants a <em>dirty woman</em> and a <em>dirty girl</em>. On a first glance, this looks unlike most other Pink Floyd songs. Why, then, does this track exist?
</p>
<p align="justify">
I think, it is connected to a previous track titled <em>Mother</em>. The movie (album) is about the construction and (later) deconstruction of a metaphorical wall. The wall exists at many different levels (for instance, as the divide between the elite and the starving masses, apparent in <em>What shall we do now</em>); the most basic being the protective wall built around Pink by his mother.
</p>
<p align="justify">
<em>Mother</em> has a line on how Pink's mother would check all of his girlfriends for him and won't let anyone <em>dirty</em> get in. Here, Pink wanting a <em>dirty</em> girl signals the beginning of the wall's destruction.
</p>
<p align="justify">
Pink Floyd amazes me every single time.</p>
]]></content:encoded>
			<wfw:commentRss>http://playingwithpointers.com/archives/557/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Potty trained cow or first monkey shot into space?</title>
		<link>http://playingwithpointers.com/archives/469</link>
		<comments>http://playingwithpointers.com/archives/469#comments</comments>
		<pubDate>Sun, 20 Mar 2011 19:55:08 +0000</pubDate>
		<dc:creator>Sanjoy</dc:creator>
				<category><![CDATA[Offline Bytes]]></category>

		<guid isPermaLink="false">http://playingwithpointers.com/?p=469</guid>
		<description><![CDATA[Many insights I've had into my self have been thanks to me asking myself some rather stupid (and sometimes insulting) questions. Like, how am I any better than a potty trained cow? I think it is important to have an axiomatic view of life - even though it is probably impossible to justify our actions [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">Many insights I've had into my self have been thanks to me asking myself some rather stupid (and sometimes insulting) questions. Like, how am I any better than a potty trained cow?</p>
<p align="justify">I think it is important to have an axiomatic view of life - even though it is probably impossible to justify our actions purely on logic, we <em>should</em> be able to do so by calling on some fundamental assumptions we make about our existence. For instance, one rather ubiquitous axiom goes "Realize God". I don't find   that cogent, but you're free to disagree.</p>
<p align="justify">Weirdly, (and sadly), for most people, the existence axiom says "Look around, and do what everyone else is doing. Be a potty trained cow.". The less (or more, depending on how you look at it) sad part is that they are not aware of its existence.</p>
<p align="justify">I am more comfortable having an axiom that borders on being a tautology, since, in my opinion, that is as good as we can   get. Specifically, I think "Do whatever that is required to increase the chances of us surviving as a species." both succinct and meaningful (well, at least as meaningful these kind of things can be anyways). Since whatever you do loses all meaning with the extinction of our race, we might as well make the converse our aim.</p>
<p align="justify">The first corollary of the fundamental axiom implies disregard for all but those personal pleasures required to keep one's productivity up. The second (also largely obvious) corollary involves polishing our art to the point where we can meaningfully contribute to the advancement of our species.</p>
<p align="justify">One can either choose to be the first monkey shot     into space or a potty trained cow. There really <em>is</em> a choice.</p>
]]></content:encoded>
			<wfw:commentRss>http://playingwithpointers.com/archives/469/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Women-only Scholarships</title>
		<link>http://playingwithpointers.com/archives/427</link>
		<comments>http://playingwithpointers.com/archives/427#comments</comments>
		<pubDate>Sat, 19 Mar 2011 20:35:43 +0000</pubDate>
		<dc:creator>Sanjoy</dc:creator>
				<category><![CDATA[Offline Bytes]]></category>

		<guid isPermaLink="false">http://playingwithpointers.com/?p=427</guid>
		<description><![CDATA[If you want (more) women engineers, do the following: Don't kill your daughter right after she is born. After successful completion of the previous step, instead of buying her a barbie, buy her a lego kit. The last step is figurative, of course. What I really mean is that the only effective way to inculcate [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">If you want (more) women engineers, do the following:</p>
<ul>
<li>Don't kill your daughter right after she is born.</li>
<li>After successful completion of the previous step, instead of buying her a barbie, buy her a lego kit.</li>
</ul>
<p align="justify">The last step is figurative, of course. What I really mean is that the only effective way to inculcate a technical mindset is attempting to do that early on. Giving out easy scholarships to twenty year olds because of their gender just produces more bad engineers, and that is the last thing we need.</p>
]]></content:encoded>
			<wfw:commentRss>http://playingwithpointers.com/archives/427/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Living In The Present</title>
		<link>http://playingwithpointers.com/archives/407</link>
		<comments>http://playingwithpointers.com/archives/407#comments</comments>
		<pubDate>Sun, 13 Mar 2011 17:23:10 +0000</pubDate>
		<dc:creator>Sanjoy</dc:creator>
				<category><![CDATA[Offline Bytes]]></category>

		<guid isPermaLink="false">http://playingwithpointers.com/?p=407</guid>
		<description><![CDATA[The sad truth about humanity is that most people would do pretty much anything if they saw enough people doing it. The average Joe crowd-sources his opinions to MTV anchors and resolves his personal issues by methods not very far from a public ballot. His personal life is a democracy and his individualism is castrated. [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">The sad truth about humanity is that most people would do pretty much anything if they saw enough people doing it.</p>
<p align="justify">The average Joe crowd-sources his opinions to MTV anchors and resolves his personal issues by methods not very far from a public ballot. His personal life is a democracy and his individualism is castrated.</p>
<p align="justify">I force myself into anti-escapism. I force myself to exist in the present, in the current moment; since one can never be sure that the past really existed and that the future would really exist. I realize that my life will not start five years from now, and that this is *it*, as good as it gets.</p>
<p align="justify">The average Janet is dating the average Joe. Love, institutionalized, requires them to follow a strict protocol, laid down by everybody. Does Janet love Joe or the protocol? Does Joe really not like to listen?</p>
<p align="justify">Our lives have no inherent meaning. Social valuations are arbitrary -- attaching meaning to our existence requires some justification. We are not yet mature enough to realize that we need to survive as a species (and how difficult that is in the long term); we still have absurd concepts like nations and religion. While I find it hard to justify my ultimate objective as increasing the survival chances of our species, I'm happy to accept it as the transcendental truth.</p>
<p align="justify">The average Joe is content existing. He does not have an art. He does not perfect himself. Outcomes of football matches make or break his day. He believes the color of his tie is of fundamental importance to the functioning of the universe.</p>
<p align="justify">The average Janet won a purse in today's raffle. She is ecstatic.</p>
]]></content:encoded>
			<wfw:commentRss>http://playingwithpointers.com/archives/407/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>On Abortion.</title>
		<link>http://playingwithpointers.com/archives/399</link>
		<comments>http://playingwithpointers.com/archives/399#comments</comments>
		<pubDate>Sat, 01 Jan 2011 16:58:02 +0000</pubDate>
		<dc:creator>Sanjoy</dc:creator>
				<category><![CDATA[Offline Bytes]]></category>

		<guid isPermaLink="false">http://playingwithpointers.com/?p=399</guid>
		<description><![CDATA[This is more a question to the reader than an opinion, since I find myself unable to come up with a cogent argument for either side. The two extreme cases are using morning-after pills (the iPill in India, for instance) which is clearly ethical, and infanticide, which is clearly wrong (ethically). In between these two [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">
This is more a question to the reader than an opinion, since I find myself unable to come up with a cogent argument for either side.
</p>
<p align="justify">
The two extreme cases are using morning-after pills (the iPill in India, for instance) which is clearly ethical, and infanticide, which is clearly wrong (ethically). In between these two extremes must lie the point where an abortion transforms from a medical operation to a homicide. How that point is to be determined is the question: When does a foetus stop being an organic growth? When does it begin counting as a person?
</p>
<p align="justify">
I've read about legalizing abortions reducing crime-rates as a far-reaching non-obvious consequence (Freakonomics); but letting the argument go in that direction will require proving that abortions lie outside the purview of ethics in the first place.
</p>
<p align="justify">
The argument about how it is a woman's duty to carry her baby etc. is obviously rubbish. But trashing the whole concept of a baby being a different person because it is demeaning to women does not make a whole lot of sense to me - I don't understand either of the clauses: why it is demeaning in the first place, and why does that invariably lead to the invalidation of the concept itself?
</p>
<p align="justify">
Even if you take Amartya Sen's idea of justice (quite literally :) ), and discard the notion of a transcendental justice, the question still remains: till what point does abortion stay "more right" than infanticide?
</p>
<p align="justify">
What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://playingwithpointers.com/archives/399/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>(Relatively) Painless Command Line Parsing With C</title>
		<link>http://playingwithpointers.com/archives/389</link>
		<comments>http://playingwithpointers.com/archives/389#comments</comments>
		<pubDate>Tue, 16 Nov 2010 09:11:06 +0000</pubDate>
		<dc:creator>Sanjoy</dc:creator>
				<category><![CDATA[Offline Bytes]]></category>

		<guid isPermaLink="false">http://playingwithpointers.com/?p=389</guid>
		<description><![CDATA[A pet peeve of mine has always been parsing command line arguments - I find it boring and painful. While tools like getopt offer some degree of help, they don't offer much of a paradigm shift. I figured it should be possible to abuse the C pre-processor to have it convert a benign list of [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">
A pet peeve of mine has always been parsing command line arguments - I find it boring and painful. While tools like <code>getopt</code> offer some degree of help, they don't offer much of a paradigm shift. I figured it should be possible to abuse the C pre-processor to have it convert a benign list of command line arguments and their type into <em>real</em> parsing code. Since I could not find something similar that already existed; and had a free afternoon; I wrote this: <a href="https://github.com/sanjoy/CmdArgs">https://github.com/sanjoy/CmdArgs</a>.
</p>
<p align="justify">
The <code>README</code> file with the (rather non-rigorous) test code should be enough to get you started. This is not a typical library (since it uses the pre-processor so heavily) - you cannot compile it to, say, <code>libcmdrargs.so</code> and dynamically link to it. You will always need to include the source in your project.
</p>
<p align="justify">
I have not focused much on code-efficiency; granted that you parse the command line arguments only once, this should not be much of a problem. Bugs, suggestions and flames welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://playingwithpointers.com/archives/389/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 2.564 seconds -->

