<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns: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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Amateur Topologist</title>
	
	<link>http://www.amateurtopologist.com</link>
	<description>Politics, programming, math, and science.</description>
	<lastBuildDate>Sat, 28 Aug 2010 16:49:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AmateurTopologist" /><feedburner:info uri="amateurtopologist" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Of Relativity, Balloons, and Automobiles</title>
		<link>http://feedproxy.google.com/~r/AmateurTopologist/~3/d9FgA1hp4ls/</link>
		<comments>http://www.amateurtopologist.com/2010/07/25/of-relativity-balloons-and-automobiles/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 19:09:48 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[relativity]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=923</guid>
		<description><![CDATA[Suppose you&#8217;re driving a car on a perfectly level road at a perfectly constant velocity (because in physics problems, everything can be done perfectly unless the error is part of the problem). And suppose someone left a helium balloon inside the car, which is free to float around. Similarly, suppose someone left a ball resting [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you&#8217;re driving a car on a perfectly level road at a perfectly constant velocity (because in physics problems, everything can be done perfectly unless the error is part of the problem). And suppose someone left a helium balloon inside the car, which is free to float around. Similarly, suppose someone left a ball resting on the floor of the car; since there are no jolts or other sudden accelerations, the ball is resting perfectly still. Now suppose you start accelerating forward. What happens to the ball and the balloon? Our physical intuition tells us that the ball will roll to the back of the car, because that&#8217;s what happens when we&#8217;re in an accelerating vehicle; things get pressed back. But what does the balloon do?</p>
<p>A lot of people, when presented with this, intuitively think that the balloon will move towards the back, just like the ball. If they&#8217;re physics-minded, they might say that the inertia of the balloon keeps it from wanting to change its velocity unless it&#8217;s forced to, and the only thing that can force it to do so is the back of the car. But if this were true, then <a class="zem_slink" title="General relativity" rel="wikipedia" href="http://en.wikipedia.org/wiki/General_relativity">general relativity</a> would be wrong! Because according to general relativity, if you don&#8217;t look outside the car window or cheat in some other way, there&#8217;s no way to tell between a uniform acceleration of 9.8 meters per second per second in the forward direction and an additional gravitational force of one G pulling you back. And when we think about it in terms of gravity, the answer becomes clear: balloons in air will move against gravitational fields, so it will move to the front of the car.</p>
<p>Hopefully, this has left you at least somewhat unsatisfied; the question of where the balloon moves has been answered, but not <strong>why</strong> it moves. For that question, consider why balloons move against gravitational fields. They move because of buoyancy, which is a result of the fact that pressure is greater when you go &#8216;deeper&#8217; into a fluid (liquid or gas) in a gravitational field. So the upwards force as a result of pressure is greater than the downwards force, and the balloon rises until something stops it or the atmosphere gets so rarefied that it reaches zero buoyancy (or, more likely, the decreased atmospheric pressure causes it to pop!) But when you have an accelerating car, the air molecules, much like the rolling ball, will tend to &#8216;pile up&#8217; in the back, causing greater pressure in the rear than in the front. And in general, this <a class="zem_slink" title="Pressure gradient" rel="wikipedia" href="http://en.wikipedia.org/wiki/Pressure_gradient">pressure gradient</a> will be enough to cause a forward force on the balloon all the way to the front of the car.</p>
<div class="zemanta-pixie" style="margin-top: 10px;height: 15px"><img class="zemanta-pixie-img" style="border: none;float: right" src="http://img.zemanta.com/pixy.gif?x-id=27155412-f1e9-4683-96d5-3f65a9a22cce" alt="" /></div>
<img src="http://feeds.feedburner.com/~r/AmateurTopologist/~4/d9FgA1hp4ls" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2010/07/25/of-relativity-balloons-and-automobiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amateurtopologist.com/2010/07/25/of-relativity-balloons-and-automobiles/</feedburner:origLink></item>
		<item>
		<title>What to do when you lose your computer</title>
		<link>http://feedproxy.google.com/~r/AmateurTopologist/~3/pcaDZLPTp3Q/</link>
		<comments>http://www.amateurtopologist.com/2010/06/14/what-to-do-when-you-lose-your-computer/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 05:32:15 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=890</guid>
		<description><![CDATA[I was recently thinking about security as a result of finding the hard copy of a PGP revocation certificate I had printed, when I realized: I had no clue what I should do in case the physical security of my computer was compromised (i.e., if it was stolen or went missing for an extended period [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently thinking about security as a result of finding the hard copy of a <a class="zem_slink" title="Pretty Good Privacy" rel="wikipedia" href="http://en.wikipedia.org/wiki/Pretty_Good_Privacy">PGP</a> revocation certificate I had printed, when I realized: I had no clue what I should do in case the physical security of my computer was compromised (i.e., if it was stolen or went missing for an extended period of time). So I decided to take stock of how many secrets I have here and what the best way to render them useless or remote-erase them would be in case I lost it, as well as to make it hard for anybody who steals it to get any use out of the secrets before I can make them useless.</p>
<p>I store my passwords in a <a class="zem_slink" title="KeePass" rel="homepage" href="http://keepass.info">KeePass</a> password database, encrypted using <a class="zem_slink" title="Advanced Encryption Standard" rel="wikipedia" href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a> using a reasonably long passphrase; I have it set to require the passphrase if the window loses focus for more than 30 seconds. I then synchronize it using <a class="zem_slink" title="Dropbox" rel="homepage" href="http://www.dropbox.com">Dropbox</a> between various computers, as well as so I can download it if I&#8217;m on a new computer that I trust enough to log into stuff on. I also have my PGP private key on my laptop. Noticeably, there are several password I have that are not written down anywhere: my MIT Kerberos password, my Gmail password (most of my password reset e-mails would be sent there, so if it was compromised everything else would be too), the KeePass database password, and my Dropbox password. And of course there&#8217;s a password on my laptop, but I wouldn&#8217;t rely on that for anything beyond keeping someone from looking at my stuff while I&#8217;m temporarily out.</p>
<p>So what does that mean in case the laptop&#8217;s stolen? Step one is to go everywhere I know of that I can sign into using public key cryptography on this machine and delete the keys; fortunately, the only such machine at the moment is the Github remotes and my VM; I&#8217;d also force-disconnect any ssh sessions that I left open by killing the processes. After that&#8217;s done, I change my Gmail password in case I left myself logged in or cookied or something, and forcibly sign out all my other accounts using the link on the bottom. If the password&#8217;s been changed or it&#8217;s been more than a day or so since I last saw the laptop, I assume all my accounts are compromised. The third step is to backup the password database and then delete it from Dropbox; if the person who stole it isn&#8217;t smart, the next time it connects to the internet it&#8217;ll delete the local copy. Interestingly, even if I change the Dropbox password, the computer will still have access to my files; if I want to disable syncing, I have to <a href="https://www.dropbox.com/account#manage">unlink the computer it on the website</a> (which does tell me when the last sync occurred). Then I change the password for my AOL and MSN accounts; MSN only lets you sign on from one place at a time, but AOL doesn&#8217;t, and I don&#8217;t know if it&#8217;s possible to force a logout. Finally, I&#8217;d probably revoke my public key; I know enough people who can get it signed that are in the strong set that it&#8217;s not terribly difficult to get back in there. I have a printout of my revocation certificate for just this occasion.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=acff001b-69d0-4553-a50e-3f3f0d68a78f" alt="" /></div>
<img src="http://feeds.feedburner.com/~r/AmateurTopologist/~4/pcaDZLPTp3Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2010/06/14/what-to-do-when-you-lose-your-computer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.amateurtopologist.com/2010/06/14/what-to-do-when-you-lose-your-computer/</feedburner:origLink></item>
		<item>
		<title>Perl will never go away, ever</title>
		<link>http://feedproxy.google.com/~r/AmateurTopologist/~3/ywSIFQh1xrc/</link>
		<comments>http://www.amateurtopologist.com/2010/05/20/perl-will-never-go-away-ever/#comments</comments>
		<pubDate>Fri, 21 May 2010 00:00:44 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[planet sipb]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=866</guid>
		<description><![CDATA[Perl was one of the first languages that I ever learned and actually truly did things with; it was the first language I ever wrote a nontrivial program in (a DES implementation that I have unfortunately lost the source code to, or else I would post it). The first language I ever wrote a program [...]]]></description>
			<content:encoded><![CDATA[<p>Perl was one of the first languages that I ever learned and actually truly did things with; it was the first language I ever wrote a nontrivial program in (a DES implementation that I have unfortunately lost the source code to, or else I would post it). The first language I ever wrote a program in was something I don&#8217;t even remember in BASIC; I seem to have blocked all memory of it from my memory, probably for the better. So I have a bit of a soft spot for the language, and so I still have some of my bad habits; since I didn&#8217;t <code class="codecolorer perl default"><span class="perl"><span style="color: #000000; font-weight: bold;">use</span> strict</span></code> or <code class="codecolorer perl default"><span class="perl"><span style="color: #339933;">-</span>w</span></code>, my code would likely be full of uninitialized variables and barewords. It&#8217;s a bad habit, and to this day I still have to be reminded occasionally that other languages, such as Python, do require variables to be declared.</p>
<p>But Perl is old now, and I&#8217;ve mostly moved on to other languages, like Python. I like the object-orientation, the support for functional paradigms and other nice things like <a class="zem_slink" href="http://en.wikipedia.org/wiki/List_comprehension" title="List comprehension" rel="wikipedia">list comprehensions</a> and lambda functions. I like not having to sigil all of my variables with $ or @ or %, I like being able to supply keyword arguments to my functions so that I don&#8217;t have to remember which weird order I decided to use, I like the sheer amount of fun things that you can do with object orientation combined with reflection, metaprogramming, and everything being a <a class="zem_slink" href="http://en.wikipedia.org/wiki/First-class_object" title="First-class object" rel="wikipedia">first-class object</a>. And yet, I still think it&#8217;ll stick around for a while.</p>
<p>Why do I say that? Simple. I was talking with someone who had left in the middle of an online IRC-based role-playing game, and they had asked for chatlogs of what had happened after they left. I had them, since I run weechat in tmux (like irssi in screen, but better!) and so am in every IRC channel I&#8217;m in 24/7. But the question was: how could I pull out just the lines that were said when he left? And the answer was Perl. It turns out that the .. operator, which in a for loop or other situations where a list is expected produces a range (so (1..9) as a list produces the list (1,2,3,4,5,6,7,8,9)), does something completely different in a scalar context, like in the conditional of an if statement. Take the statement <code class="codecolorer perl default"><span class="perl"><a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/Person.*has quit/</span> <span style="color: #339933;">..</span> <span style="color: #009966; font-style: italic;">/Person.*has joined/</span><span style="color: #009900;">&#41;</span></span></code>. Each time this statement is run, the conditional will evaluate to false, until the left-hand side evaluates to true. Then it&#8217;ll start evaluating to true, until the right-hand side evaluates to false, and then it&#8217;ll stop being true (but it&#8217;ll still be true until it&#8217;s evaluated again!), etc., etc. So if this is in an implicit while loop running through the lines of a file, it&#8217;ll start printing when it sees a line saying Person has quit, including that line, then stop when they rejoin, but still print that line, and then it&#8217;ll keep going until it sees another quit line, etc. And the best part is, if you call perl with -n, you automatically get a while loop that assigns the current line of the file it&#8217;s reading from to $_, the implicit variable in the matching and print.</p>
<p>If I wanted to do that in something like Python, I&#8217;d have to manually set up the read loop, write a function to trawl through, build up regexp objects to match on, etc. And that&#8217;s fine for a piece of code I intend to maintain. But for a quick one-line script like this? Too much effort. All I need is perl -ne.</p>
<div class="zemanta-pixie" style="margin-top:10px;height:15px"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=4d5cdf8f-420b-4f32-8a10-4d20fa6ef966" style="border:none;float:right"><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
<img src="http://feeds.feedburner.com/~r/AmateurTopologist/~4/ywSIFQh1xrc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2010/05/20/perl-will-never-go-away-ever/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.amateurtopologist.com/2010/05/20/perl-will-never-go-away-ever/</feedburner:origLink></item>
		<item>
		<title>Making Terminal.app suck less</title>
		<link>http://feedproxy.google.com/~r/AmateurTopologist/~3/jGjRgfzod-U/</link>
		<comments>http://www.amateurtopologist.com/2010/04/27/making-terminal-app-suck-less/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 01:04:13 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=842</guid>
		<description><![CDATA[For various reasons (mostly due to the fact that iTerm would regularly spike in CPU usage whenever I was causing it to redraw large portions of the screen, causing noticeable lag), I&#8217;ve been forced to switch away from iTerm as my terminal emulator of choice, back to the standard Terminal.app. It&#8217;s a decent piece of [...]]]></description>
			<content:encoded><![CDATA[<p>For various reasons (mostly due to the fact that <a class="zem_slink" title="iTerm" rel="homepage" href="http://iterm.sourceforge.net/">iTerm</a> would regularly spike in CPU usage whenever I was causing it to redraw large portions of the screen, causing noticeable lag), I&#8217;ve been forced to switch away from iTerm as my terminal emulator of choice, back to the standard Terminal.app. It&#8217;s a decent piece of software, but it has a few issues of its own.</p>
<p>First, it&#8217;s 16-color only, and there&#8217;s no way to change the colors. While the former can&#8217;t be helped, the latter can: if you install <a href="http://www.culater.net/software/SIMBL/SIMBL.php">SIMBL</a>, then download TerminalColors (either the <a href="http://ciaranwal.sh/files/TerminalColours.bundle.zip">Leopard version</a> or the <a href="http://github.com/timmfin/terminalcolours/raw/master/TerminalColours-SL-64bit.zip">Snow Leopard version</a>, whichever is appropriate), then unzip and move the resulting directory into /Library/Application Support/SIMBL/Plugins, then restart, you&#8217;ll be able to modify colors under Settings -&gt; Text by clicking the new &#8216;More&#8217; button.</p>
<p>Second, the Home and End keys, to put it bluntly, suck. They don&#8217;t work in most programs. The fix for this is to go to Settings -&gt; Keyboard, then creating/editing the entry for the home key. Select &#8216;send string to shell&#8217;, and in the text entry field, press escape, then capital O, then capital H, so it reads \033OH. Then do the same for the end key, only this time insert \033OF. It should work pretty much everywhere. Page up is \033[5~  and page down is \033[6~.</p>
<p>There are a couple other things: add<br />
<code class="codecolorer bash default"><span class="bash"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">grep</span>=<span style="color: #ff0000;">&quot;grep --color=auto&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">rgrep</span>=<span style="color: #ff0000;">&quot;grep -r --color=auto&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">grip</span>=<span style="color: #ff0000;">&quot;grep -i --color=auto&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">rgrip</span>=<span style="color: #ff0000;">&quot;grep -ir --color=auto&quot;</span><br />
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">ls</span>=<span style="color: #ff0000;">&quot;ls -G&quot;</span></span></code><br />
to colorize ls and grep by default, as well as add some convenient aliases (grip for case-insensitivity, rgrep for recursive grep).</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=931eb747-bea3-4c8c-a719-ef62f50634c1" alt="" /><span class="zem-script "><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<img src="http://feeds.feedburner.com/~r/AmateurTopologist/~4/jGjRgfzod-U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2010/04/27/making-terminal-app-suck-less/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.amateurtopologist.com/2010/04/27/making-terminal-app-suck-less/</feedburner:origLink></item>
		<item>
		<title>Security vulnerability in Haskell with CGI</title>
		<link>http://feedproxy.google.com/~r/AmateurTopologist/~3/-8V2esLOlQA/</link>
		<comments>http://www.amateurtopologist.com/2010/04/23/security-vulnerability-in-haskell-with-cgi/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 19:18:11 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[planet sipb]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=821</guid>
		<description><![CDATA[Compiled Haskell programs all include special RTS (Run Time System) options, that change things like the number of cores that it runs on, various internal things relating to how often garbage collection runs, etc. They&#8217;re specified by invoking the program like ./foo +RTS -m10 -k2000 -RTS to run the GHC-compiled program &#8216;foo&#8217;, reserving 10% of [...]]]></description>
			<content:encoded><![CDATA[<p>Compiled Haskell programs all include special <a title="RTS (Run Time System) options" href="http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html">RTS (Run Time System) options</a>, that change things like the number of cores that it runs on, various internal things relating to how often garbage collection runs, etc. They&#8217;re specified by invoking the program like ./foo +RTS -m10 -k2000 -RTS to run the GHC-compiled program &#8216;foo&#8217;, reserving 10% of the heap for allocation and setting each thread&#8217;s stack size to a maximum of 2000 bytes. In the current build of GHC, there is no way to disable these options from working (although the option &#8211;RTS will make all further options be interpreted as normal, non-RTS options). The problem is that the option -tout will write profiling data to the file out. So, if your program is setuid root, anybody who runs it can write the profiling data to, say /etc/passwd and render the system unusable. They don&#8217;t get to pick what gets written, so they can&#8217;t add a backdoor for themselves, but they can essentially scribble over whatever files they want. This is bug <a href="http://hackage.haskell.org/trac/ghc/ticket/3910">#3910</a>, and the fix (disabling RTS by default) has been uploaded.</p>
<p>Now, one of the more little-known features of CGI is that if you pass a <a class="zem_slink" title="Query string" rel="wikipedia" href="http://en.wikipedia.org/wiki/Query_string">query string</a> that does not contain any = signs to a CGI script, the httpd may pass the string along as command-line arguments. This is specified in section 4.4 of <a href="http://www.ietf.org/rfc/rfc3875">RFC 3875</a>, and it specifies how the query string SHOULD be turned into arguments (although it does not say anything about whether the httpd should behave this way, only that some do). <a href="http://code.amateurtopologist.com/args.pl?foo%20bar+%2BRTS+2">This</a> is an example script that only outputs its arguments in a comma-separated list; the link gives it some sample arguments. Note that by URL-escaping, you can send arbitrary strings through&#8230; including +RTS. So if that were, say, a Haskell script, I could pass the query string ?%2BRTS+-tindex.html+-RTS and overwrite index.html.</p>
<p>There are three ways to get around this: first, GHC 6.12.2 has the -no-rtsopts option, which will obviously disable RTS options. So if you just recompile your script with that, it&#8217;ll be safe. Note that 6.14 will disable the RTS options by default; the 6.12.2 patch didn&#8217;t for backwards-compatibility reasons. Second, if you don&#8217;t want to use 6.12.2 for whatever reason, you can wrap it in a shell script that calls it with no options. For example, replace the Haskell script with a shell script called, say, hscript.cgi (if your Haskell program is called hscript) that calls it with no arguments, e.g.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>hscript.real</div></div>
<p>and rename the Haskell script to hscript.real, so that it doesn&#8217;t get run as CGI (I&#8217;m assuming that .real files don&#8217;t get run as CGI on your machine!) Another thing you can do is to add the following to your .htaccess, which will give 403 Forbidden errors to anybody passing RTS arguments in the URL:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">RewriteEngine on<br />
RewriteCond %{QUERY_STRING} ^(?:[^=]*\+)?(?:%2[bB]|(?:-|%2[dD]){1,2})(?:%52|R)(?:%54|T)(?:%53|S)(?:\+[^=]*)?$<br />
RewriteRule ^ - [F]</div></div>
<p>This will solve it for every Haskell script you use, but relies on the regex being correct, which isn&#8217;t something I can guarantee.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=dc920732-9bc7-483f-86ba-973d77aa0634" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<img src="http://feeds.feedburner.com/~r/AmateurTopologist/~4/-8V2esLOlQA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2010/04/23/security-vulnerability-in-haskell-with-cgi/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.amateurtopologist.com/2010/04/23/security-vulnerability-in-haskell-with-cgi/</feedburner:origLink></item>
		<item>
		<title>dissociated-blogosphere: never have to write an original post again!</title>
		<link>http://feedproxy.google.com/~r/AmateurTopologist/~3/-GoRvlxxzPA/</link>
		<comments>http://www.amateurtopologist.com/2010/04/06/dissociated-blogosphere-never-have-to-write-an-original-post-again/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 01:18:30 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[dissociated blogosphere]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[planet sipb]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=796</guid>
		<description><![CDATA[For the past two weeks or so, I&#8217;ve been working off and on on a project called dissociated blogosphere (OSX and Linux binaries here). It takes a bunch of URLs, looks through them for an RSS for the raw content of the posts, and then stores the words of the posts in an array. It [...]]]></description>
			<content:encoded><![CDATA[<p>For the past two weeks or so, I&#8217;ve been working off and on on a project called <a href="http://github.com/veinor/dissociated-blogosphere">dissociated blogosphere</a> (OSX and Linux binaries <a href="http://code.amateurtopologist.com/dissociated-blogosphere/bin">here</a>). It takes a bunch of URLs, looks through them for an RSS for the raw content of the posts, and then stores the words of the posts in an array. It then picks N random, consecutive words (where in this case N is 2), and starts generating new text, by picking a new word x% of the time if x% of the time, the previous N words were followed by that word. For example, if 90% of the time, the words &#8216;the quick&#8217; were followed by &#8216;brown&#8217;, and the other 10% of the time, they were followed by &#8216;red&#8217;, then when the two-word phrase &#8216;the quick&#8217; was randomly generated, it would pick &#8216;brown&#8217; 9 times out of 10, and &#8216;red&#8217; 1 time out of 10. This is the algorithm <a class="zem_slink" title="Emacs" rel="homepage" href="http://www.gnu.org/software/emacs/">Emacs</a>&#8216;s <a class="zem_slink" title="Dissociated press" rel="wikipedia" href="http://en.wikipedia.org/wiki/Dissociated_press">dissociated press</a> feature uses, hence the name. Running it a few times on this site and picking some of my favorite sentences gives:</p>
<blockquote><p>
Second, I ignored the axes of the work you envision. So start small, and think about the free group on two generators, which is obviously highly undesirable behavior. However, it does have the web interface, I&#8217;ll have it up by last week, but that obviously didnt happen. Taking into account the fact that I&#8217;m using. The central thing that makes MS Paint Adventures unique to the point where it&#8217;s my go-to language for random programs (I still use Python for that), but if we pick two of them and rotate one of the set of all rotations that you have some custom function you want soup or salad, both is not a valid answer.</p></blockquote>
</blockquote>
<p>It&#8217;s my first medium-scale project written in <a class="zem_slink" title="Haskell (programming language)" rel="homepage" href="http://haskell.org">Haskell</a> (even though there isn&#8217;t a lot of code, what little was there was not trivial to write), and I&#8217;ve learned several lessons from it:</p>
<ul>
<li><strong>The <a title="Haskell wiki" href="http://www.haskell.org/haskellwiki/Haskell">Haskell wiki</a> is an excellent resource.</strong> When I was trying to learn how to use HXT, the <a title="HXT" href="http://www.fh-wedel.de/~si/HXmlToolbox/">Haskell XML Toolbox</a>, I found the provided documentation somewhat inadequate. But the <a title="HXT article on the Haskell wiki" href="http://www.haskell.org/haskellwiki/HXT">HXT article on the Haskell wiki</a> is an excellent introduction to the filter abstraction, which is all that I need for the basic stuff that I&#8217;m using.</li>
<li><strong>Read the Haddock documentation.</strong> The HXT article, as useful as it was, didn&#8217;t cover a couple essential things I needed to know (such as how to pull all elements with type &#8220;application/rss+xml&#8221;). So I look at the documentation for <a title="documentation for Text.XML.HXT.Arrow.XmlArrow" href="http://hackage.haskell.org/packages/archive/hxt/8.5.2/doc/html/Text-XML-HXT-Arrow-XmlArrow.html">Text.XML.HXT.Arrow.XmlArrow</a> (the module containing the arrows that HXT uses to filter XML), and saw that <code class="codecolorer haskell default"><span class="haskell">hasAttrValue <span style="color: #339933; font-weight: bold;">::</span> <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:String"><span style="color: #cccc00; font-weight: bold;">String</span></a> <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#40;</span><a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:String"><span style="color: #cccc00; font-weight: bold;">String</span></a> <span style="color: #339933; font-weight: bold;">-&gt;</span> <a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:Bool"><span style="color: #cccc00; font-weight: bold;">Bool</span></a><span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> a XmlTree XmlTree</span></code> looks about right; from the type, I can guess (correctly) that I need to pass it the attribute and a prediate on the value of the attribute (i.e., <code class="codecolorer haskell default"><span class="haskell">hasAttrValue <span style="background-color: #3cb371;">&quot;href&quot;</span> <span style="color: green;">&#40;</span><span style="color: #339933; font-weight: bold;">==</span> <span style="background-color: #3cb371;">&quot;application/rss+xml&quot;</span><span style="color: green;">&#41;</span></span></code>).</li>
<li><strong>One goal at a time.</strong> This isn&#8217;t specific to Haskell. When I started on this, I meant for it to require you to provide the RSS feed. Then, I realized that having a larger corpus might be better, so I added the ability to pull from multiple feeds. Then I decided that expecting people to find the RSS feed by hand might be a bit much, so I rewrote it to pull the RSS feed from the site. And I eventually plan to write a CGI frontend so that you can just run it online. If I had decided from the start to do all these things, I probably never would&#8217;ve gotten started. As <a href="http://web.archive.org/web/20050404020308/http://www.linuxtimes.net/modules.php?name=News&amp;file=article&amp;sid=145">Linus Torvalds said</a>:<br />
<blockquote><p>Nobody should start to undertake a large project. You start with a small trivial project, and you should never expect it to get large. If you do, you&#8217;ll just overdesign and generally think it is more important than it likely is at that stage. Or worse, you might be scared away by the sheer size of the work you envision. So start small, and think about the details. Don&#8217;t think about some big picture and fancy design. If it doesn&#8217;t solve some fairly immediate need, it&#8217;s almost certainly over-designed.</p></blockquote>
</li>
<li><strong>Strip and gzip your executables if you&#8217;re going to distribute them.</strong> Due to the fact that I&#8217;m statically linking in HXT, which is a sizeable library, the compiled, non-stripped version of dissociated-blogosphere is a whopping 12 megabytes. This isn&#8217;t due to inefficiencies in my own code, but due to the sheer size of the HXT library. Running the Unix command line utility <a href="http://en.wikipedia.org/wiki/Strip_(Unix)">strip</a> (which only removes internal debugging information) cuts it down to about 5 MB, and then gzipping the binaries takes it down to a little over a megabyte.</li>
<li><strong>Split things into libraries where it&#8217;s appropriate.</strong> Part of the problem with using HXT is that it makes recompilation slow; if I could do it all over again, I might have used <a href="http://www.haskell.org/HaXml/">HaXml</a>, but HXT has the advantage of having nontrivial amounts of documentation written about it (on the Haskell wiki). If I had instead split the RSS parsing code into its own library, I could have only recompiled those parts whenever I touched them, which wasn&#8217;t nearly as often as I touched the code frontend. Plus, it&#8217;s just good programming practice.</li>
</ul>
<p>So what do I have planned for dissociated-blogosphere? First off, I plan to make it faster by caching RSS lookups; by storing a map from page URLs to RSS feed, I can cut the number of network requests in half. Second, I plan to implement actual error handling; right now if you give it a bad URL it fails and doesn&#8217;t produce any useful output, regardless of whether other URLs are good. Third, I&#8217;m going to split out the RSS part into its own library, which I might make its own package on hackage. Fourth, I intend to eventually write a web interface (either in Haskell or in Python) so that you don&#8217;t have to download and install it. I originally intended to have the web interface up by last week, but that obviously didn&#8217;t happen. Taking into account the fact that it&#8217;ll take longer than I think it does, I&#8217;m guessing I&#8217;ll have it up by two weeks from now (so, a month). And finally, when/if I do the web interface, I&#8217;ll have it color the text according to which blog it&#8217;s from, or maybe even output xterm color codes if I don&#8217;t write the web interface.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=d52a7644-8d19-4dd2-b6d2-4603793b4e7c" alt="" /><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<img src="http://feeds.feedburner.com/~r/AmateurTopologist/~4/-GoRvlxxzPA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2010/04/06/dissociated-blogosphere-never-have-to-write-an-original-post-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amateurtopologist.com/2010/04/06/dissociated-blogosphere-never-have-to-write-an-original-post-again/</feedburner:origLink></item>
		<item>
		<title>What comes after reCAPTCHA?</title>
		<link>http://feedproxy.google.com/~r/AmateurTopologist/~3/YBVFM7CviUs/</link>
		<comments>http://www.amateurtopologist.com/2010/03/16/what-comes-after-recaptcha/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 23:02:38 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[planet sipb]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=775</guid>
		<description><![CDATA[reCAPTCHA, the system I use to keep spam out of the comments, is probably one of the most popular CAPTCHAs (Completely Automated Method[s] to Tell Computers and Humans Apart) out there. And for a very good reason: it draws its source words only from texts that current optical character recognition (OCR) technology is unable to [...]]]></description>
			<content:encoded><![CDATA[<p>reCAPTCHA, the system I use to keep spam out of the comments, is probably one of the most popular CAPTCHAs (Completely Automated Method[s] to Tell Computers and Humans Apart) out there. And for a very good reason: it draws its source words only from texts that current optical character recognition (OCR) technology is unable to read; therefore, no spam bot should be able to read them, especially after reCAPTCHA applies some extra distortion to render it absolutely non-machine-readable. But what do we do when the state of OCR technology advances to the point where they get as good as humans at reading text? As technology for reading words improves, it seems likely that within the next decade or two, the level of distortion necessary to render it unreadable by machines will also make it illegible to humans. So what next?</p>
<p>One class is image-recognition CAPTCHA: you present the user with ten distorted images (to prevent random guessing by bots) and ask them which ones contain a cat, or which ones have been rotated upside-down, or which ones are people. This is essentially a generalization of text-based CAPTCHAS, but it has several problems. First and foremost, you need a large source of images to show the user.  This is one of the huge advantages of text-based CAPTCHAs: they can be procedurally generated. If the image database for a CAPTCHA service is small, then it&#8217;ll be passed around by spam bots; since recognizing whether two images are the same is a fairly solved problem, all they have to do is answer your question for each of the images once. (The distortion&#8217;s purpose is to make image comparison harder in case spammers do get a hold of your database, not to make it impossible). One method would be to browse Flickr for photos tagged with an object and assume that each such photo contains an object, but you&#8217;re running into copyright issues as well as essentially relying on the fact that someone won&#8217;t tag a photo &#8216;cat&#8217; just because it has a kitten in the distant background.</p>
<p>One other idea that I&#8217;ve seen a couple sites use is knowledge-based, relying on the fact that machines can&#8217;t yet parse natural language. So it asks a question like &#8220;what is 2 plus 2?&#8221;. The fundamental problem I see with this is that, again, you&#8217;re going to have a very small repertoire of questions; a CAPTCHA has to be able to be generated by a computer. Not to mention the fact that whatever question-generating algorithm you use could just be reverse-engineered to extract content, then passed to Google or Wolfram Alpha to get the answer. Unlike images, there&#8217;s no way to &#8216;distort&#8217; a question.</p>
<p>A third possibility, orthogonal to trying to tell real people from computers, is to look at the content of the message, rather than require the message sender to pass some arbitrary test. This is the approach Akismet (which comes by default on WordPress) uses, and is similar to the way e-mail clients detect spam. This has the downside of having a higher false positive rate than CAPTCHA-based methods. A short comment saying &#8216;Hey, I read your article and liked it; check out this link&#8217; can either be legitimate or spam, and determining which one it is would require knowing the contents of the link. So your CAPTCHA system would have to visit links posted by users, which is obviously highly undesirable behavior. However, it does have the advantage of not relying on some problem being &#8216;hard&#8217; to solve, and it also removes the (admittedly small) barrier to commenting that CAPTCHAs produce.</p>
<p>For now, reCAPTCHA will remain good enough; it&#8217;s easy to solve, and the word combinations that I can&#8217;t easily read can be dismissed with a click of the refresh button. And since I have very low traffic, I can afford to have an e-mail sent to me for every comment I get here; if it does wind up being spam (apparently, either reCAPTCHA isn&#8217;t completely impervious to computer solving or there&#8217;s some sweatshop worker whose job is to spam sites with cheap Viagra ads) I can just delete it.</p>
<img src="http://feeds.feedburner.com/~r/AmateurTopologist/~4/YBVFM7CviUs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2010/03/16/what-comes-after-recaptcha/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.amateurtopologist.com/2010/03/16/what-comes-after-recaptcha/</feedburner:origLink></item>
		<item>
		<title>I heard you like spheres: the Banach-Tarski paradox</title>
		<link>http://feedproxy.google.com/~r/AmateurTopologist/~3/AWfWcrQcC1g/</link>
		<comments>http://www.amateurtopologist.com/2010/03/08/the-banach-tarski-paradox/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 18:25:06 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Math]]></category>
		<category><![CDATA[set theory]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=221</guid>
		<description><![CDATA[In most people&#8217;s minds, or at least in the minds of those with a mathematical bent, every set of points in (a fancy way of writing three-dimensional Euclidean space) has a volume. Some sets, such as any set consisting of a finite number of points, has zero volume, whereas other sets, such as the set [...]]]></description>
			<content:encoded><![CDATA[<p>In most people&#8217;s minds, or at least in the minds of those with a mathematical bent, every set of points <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-5dbc98dcc983a70728bd082d1a47546e.gif" alt="S" title="S" style="vertical-align: 0px; border: none;"/> in <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-a6bcd1eddcf2923b077bd5e08d5731c6.gif" alt="\mathbb{R}^3" title="\mathbb{R}^3" style="vertical-align: 0px; border: none;"/> (a fancy way of writing three-dimensional Euclidean space) has a volume. Some sets, such as any set consisting of a finite number of points, has zero volume, whereas other sets, such as the set of all points less than one unit away from the origin, have finite but non-zero volume, and still other sets, such as <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-a6bcd1eddcf2923b077bd5e08d5731c6.gif" alt="\mathbb{R}^3" title="\mathbb{R}^3" style="vertical-align: 0px; border: none;"/> itself, have infinite volume. But does every set necessarily have a volume? It turns out the answer is no, even in one-dimensional Euclidean space; I showed this in <a href="http://www.amateurtopologist.com/2009/09/05/vitali-sets-sets-without-length/">a previous post</a>. Instead, I&#8217;ll show you the Banach-Tarski paradox, which states that it is possible, via translations and rotations, to dissect a three-dimensional sphere (technically a 3-ball) and rearrange it into two spheres of the same radius as the original.</p>
<p>For simplicity, we&#8217;ll start by only looking at the surface of the sphere, <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-5ad83b44f7458dc7e77258c700e8a861.gif" alt="S^2" title="S^2" style="vertical-align: 0px; border: none;"/>. Let <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/> refer to rotation by <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-85bc3565c74bdd8252f37deb4ab7bc01.gif" alt="\pi ^ \circ" title="\pi ^ \circ" style="vertical-align: 0px; border: none;"/> (that is, pi degrees) about the <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/>-axis and let <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-415290769594460e2e485922904f345d.gif" alt="y" title="y" style="vertical-align: -4px; border: none;"/> refer to rotation by <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-85bc3565c74bdd8252f37deb4ab7bc01.gif" alt="\pi ^ \circ" title="\pi ^ \circ" style="vertical-align: 0px; border: none;"/> about the <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-415290769594460e2e485922904f345d.gif" alt="y" title="y" style="vertical-align: -4px; border: none;"/>-axis. The exact degree of the rotation isn&#8217;t important, only that it should be impossible via any combination of <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/> and <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-415290769594460e2e485922904f345d.gif" alt="y" title="y" style="vertical-align: -4px; border: none;"/> to go back to the origin. Let <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-c1d9f50f86825a1a2302ec2449c17196.gif" alt="H" title="H" style="vertical-align: 0px; border: none;"/> be the set of all rotations that you can get by combining <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/>, <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-415290769594460e2e485922904f345d.gif" alt="y" title="y" style="vertical-align: -4px; border: none;"/>, and their inverses. Then <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/> and <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-415290769594460e2e485922904f345d.gif" alt="y" title="y" style="vertical-align: -4px; border: none;"/> form what&#8217;s known as the &#8221;<a href="http://en.wikipedia.org/wiki/Examples_of_groups#Free_group_on_two_generators">free group on two generators</a>&#8220;, which is composed of all strings using <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/>, <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-415290769594460e2e485922904f345d.gif" alt="y" title="y" style="vertical-align: -4px; border: none;"/>, <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-48ea9be719fa783b7063fd5c5531521a.gif" alt="x^{-1}" title="x^{-1}" style="vertical-align: 0px; border: none;"/>, and <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-7f3509943ed45dca6bc7253ad677e248.gif" alt="y^{-1}" title="y^{-1}" style="vertical-align: -4px; border: none;"/> as symbols, with the provision that <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/> and <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-48ea9be719fa783b7063fd5c5531521a.gif" alt="x^{-1}" title="x^{-1}" style="vertical-align: 0px; border: none;"/> cannot appear together for <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-a705544f265074606e3cb05d83eaaf95.gif" alt="x=a,b" title="x=a,b" style="vertical-align: -4px; border: none;"/>. The multiplication for this group is just writing the strings together, subject to the rule that <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/> and <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-48ea9be719fa783b7063fd5c5531521a.gif" alt="x^{-1}" title="x^{-1}" style="vertical-align: 0px; border: none;"/> cancel, as do <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-7f3509943ed45dca6bc7253ad677e248.gif" alt="y^{-1}" title="y^{-1}" style="vertical-align: -4px; border: none;"/> and <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-415290769594460e2e485922904f345d.gif" alt="y" title="y" style="vertical-align: -4px; border: none;"/>. So, for example, <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-483519ae7476a4f9cd8c7f0d9bb0be7a.gif" alt="(xy^{-1}xxy^{-1})(yx^{-1}y)=xy^{-1}xxy^{-1}yx^{-1}y=xy^{-1}xy" title="(xy^{-1}xxy^{-1})(yx^{-1}y)=xy^{-1}xxy^{-1}yx^{-1}y=xy^{-1}xy" style="vertical-align: -4px; border: none;"/>. The name arises from the fact that there are two &#8216;fundamental&#8217; symbols, <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/> and <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-415290769594460e2e485922904f345d.gif" alt="y" title="y" style="vertical-align: -4px; border: none;"/>, and it is &#8216;free&#8217;, since they don&#8217;t commute (that is, <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-23ee41544ac15acefcb1a423260113bd.gif" alt="xy \neq yx" title="xy \neq yx" style="vertical-align: -4px; border: none;"/>).</p>
<p>Now, one very weird fact about the free group on two generators (written <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-adfa0c88ec236f64b0c078015d65db2b.gif" alt="F_2" title="F_2" style="vertical-align: -3px; border: none;"/>) is that you can break it into four pieces, rearrange those four pieces, and then reassemble them into two copies of it. To elaborate, let <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-34999b3844747f7ae0be7ab5675e633a.gif" alt="S(x)" title="S(x)" style="vertical-align: -4px; border: none;"/> denote the set of strings in <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-adfa0c88ec236f64b0c078015d65db2b.gif" alt="F_2" title="F_2" style="vertical-align: -3px; border: none;"/> that start with <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/>, and similarly for the other three symbols; let <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-e1671797c52e15f763380b45e841ec32.gif" alt="e" title="e" style="vertical-align: 0px; border: none;"/> denote the empty string. Then obviously <center><img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-866d282575f7818e24f5887c075750f5.gif" alt="F_2=\{e\}\cup S(x) \cup S(x^{-1}) \cup S(y) \cup S(y^{-1})" title="F_2=\{e\}\cup S(x) \cup S(x^{-1}) \cup S(y) \cup S(y^{-1})" style="vertical-align: -5px; border: none;"/></center>. But we also have (if we include <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-e1671797c52e15f763380b45e841ec32.gif" alt="e" title="e" style="vertical-align: 0px; border: none;"/> in <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-59410a59e72bc7bedcedf5c37baae159.gif" alt="aS(a^{-1})" title="aS(a^{-1})" style="vertical-align: -4px; border: none;"/>) <center><img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-b2a63aef50f278493d59023176e5d01b.gif" alt="F_2=aS(a^{-1})\cup S(a)" title="F_2=aS(a^{-1})\cup S(a)" style="vertical-align: -4px; border: none;"/></center> The reason for this is that if the string <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-03c7c0ace395d80182db07ae2c30f034.gif" alt="s" title="s" style="vertical-align: 0px; border: none;"/> doesn&#8217;t start with <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-0cc175b9c0f1b6a831c399e269772661.gif" alt="a" title="a" style="vertical-align: 0px; border: none;"/>, then it&#8217;s the same string as <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-a7791c76c6de10ab6341ce3ec0ce9f5a.gif" alt="aa^{-1}s" title="aa^{-1}s" style="vertical-align: 0px; border: none;"/> and so is in <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-59410a59e72bc7bedcedf5c37baae159.gif" alt="aS(a^{-1})" title="aS(a^{-1})" style="vertical-align: -4px; border: none;"/>; otherwise, it&#8217;s in <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-c649b28018c61da37ea70bda100b798a.gif" alt="S(a)" title="S(a)" style="vertical-align: -4px; border: none;"/>. We also have, for the same reason, <center><img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-d7231b7ca6dc74ad8cb23ec3d2d22b49.gif" alt="F_2=bS(b^{-1})\cup S(b)" title="F_2=bS(b^{-1})\cup S(b)" style="vertical-align: -4px; border: none;"/></center></p>
<p>How is that relevant? Well, <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-c1d9f50f86825a1a2302ec2449c17196.gif" alt="H" title="H" style="vertical-align: 0px; border: none;"/> partitions <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-5ad83b44f7458dc7e77258c700e8a861.gif" alt="S^2" title="S^2" style="vertical-align: 0px; border: none;"/> into orbits, where an orbit is a collection of points such that each element of <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-c1d9f50f86825a1a2302ec2449c17196.gif" alt="H" title="H" style="vertical-align: 0px; border: none;"/> moves points from the orbit into the orbit, and points not in the orbit into another point not in the orbit. For each orbit, we can pick a point <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-83878c91171338902e0fe0fb97a8c47a.gif" alt="p" title="p" style="vertical-align: -4px; border: none;"/> inside it; let the set of all these points be <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-44c29edb103a2872f519ad0c9a0fdaaa.gif" alt="P" title="P" style="vertical-align: 0px; border: none;"/>. Then we can turn the decomposition of <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-adfa0c88ec236f64b0c078015d65db2b.gif" alt="F_2" title="F_2" style="vertical-align: -3px; border: none;"/> into a decomposition of <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-c1d9f50f86825a1a2302ec2449c17196.gif" alt="H" title="H" style="vertical-align: 0px; border: none;"/>; using <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-355b078226649f1cf244ee0f59eeaf3a.gif" alt="H(x)" title="H(x)" style="vertical-align: -4px; border: none;"/> to indicate the set of all rotations in <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-c1d9f50f86825a1a2302ec2449c17196.gif" alt="H" title="H" style="vertical-align: 0px; border: none;"/> that start with <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-9dd4e461268c8034f5c8564e155c67a6.gif" alt="x" title="x" style="vertical-align: 0px; border: none;"/>, we have <center><img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-f5aebde23a3ec0969dbd5e230a6e8a82.gif" alt="S^2=xH(x^{-1})\cup H(x)=H(x)\cup H(y) \cup H(x^{-1}) \cup H(x^{-1})" title="S^2=xH(x^{-1})\cup H(x)=H(x)\cup H(y) \cup H(x^{-1}) \cup H(x^{-1})" style="vertical-align: -4px; border: none;"/></center><br />
These four sets together make up the sphere (except for <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-44c29edb103a2872f519ad0c9a0fdaaa.gif" alt="P" title="P" style="vertical-align: 0px; border: none;"/> itself; we&#8217;ll get back to that), but if we pick two of them and rotate one of those two, we also get back the sphere. Therefore, we can break down the sphere into four pieces and recompose them into two spheres. If we then draw lines joining the sphere to the origin, we can turn this into a decomposition of two solid spheres.</p>
<p>Now, there are two omissions in this proof: first off, I ignored the origin. It turns out that you can cut the sphere without the origin up, rearrange it, and then put it back together so that you have the origin. Second, I ignored the axes of the rotations in <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-c1d9f50f86825a1a2302ec2449c17196.gif" alt="H" title="H" style="vertical-align: 0px; border: none;"/>; they are the fixed points of these rotations, and so might cause problems; it turns out that if we call those points <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-f623e75af30e62bbd73d6df5b50bb7b5.gif" alt="D" title="D" style="vertical-align: 0px; border: none;"/>; we can again cut up <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-194fe99c76b5b78115caa76f280c57c4.gif" alt="S^2-D" title="S^2-D" style="vertical-align: 0px; border: none;"/> and rearrange it into <img src="http://www.amateurtopologist.com/wp-content/ql-cache/quicklatex-5ad83b44f7458dc7e77258c700e8a861.gif" alt="S^2" title="S^2" style="vertical-align: 0px; border: none;"/>.</p>
<p>So what does this mean? If we want to have any reasonable definition of volume, then we want translations and rotations to leave it the same. Then, we must have that some of these sets don&#8217;t have a well-defined volume; much like how you can construct a subset of the real line that doesn&#8217;t have one. We break the sphere down into a number of sets, some of which don&#8217;t have a defined volume; then we move them around and reassemble them. There&#8217;s no contradiction here, since two sets that don&#8217;t have a well-defined volume (or non-measurable sets, as they&#8217;re known) might have a union that has a volume. Of course, this is physically meaningless, since you can&#8217;t actually perform the required divisions; atoms are not infinitely small, after all.</p>
<img src="http://feeds.feedburner.com/~r/AmateurTopologist/~4/AWfWcrQcC1g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2010/03/08/the-banach-tarski-paradox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amateurtopologist.com/2010/03/08/the-banach-tarski-paradox/</feedburner:origLink></item>
		<item>
		<title>MS Paint Adventures: one of the first true webcomics</title>
		<link>http://feedproxy.google.com/~r/AmateurTopologist/~3/DyM6YVroeHY/</link>
		<comments>http://www.amateurtopologist.com/2010/03/04/ms-paint-adventures-one-of-the-first-true-webcomics/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 18:32:29 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[mspa]]></category>
		<category><![CDATA[the internet]]></category>
		<category><![CDATA[webcomics]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=727</guid>
		<description><![CDATA[This blog post contains minor spoilers for Homestuck. The phenomenon of the webcomic is not exactly new by any means; Sluggy Freelance, one of the oldest still-running webcomics, is 12 years old, only slightly older than widespread availability of the Internet. So what do I mean when I say that MS Paint Adventures is one [...]]]></description>
			<content:encoded><![CDATA[<p>This blog post contains minor spoilers for Homestuck.</p>
<p>The phenomenon of the webcomic is not exactly new by any means; Sluggy Freelance, one of the oldest still-running webcomics, is 12 years old, only slightly older than widespread availability of the Internet. So what do I mean when I say that <a href="http://www.mspaintadventures.com/">MS Paint Adventures</a> is one of the first first few webcomics? It&#8217;s one of the few (that I&#8217;m aware of, of course) that actually uses the full potential of a comic that takes place online.</p>
<p>The central thing that makes MS Paint Adventures unique to the best of my knowledge among comics is that the story is in large part driven by the fans. Andrew Hussie, the author, has stated in an interview that he does not plan out the direction the plot will take in advance; although he has some overall ideas of the direction he wants it to go, he lets the reader suggestions dictate it to a larger extent than essentially any other webcomic, or indeed any other form of serial storytelling. The only reason that this is possible is because of the MSPA forum; while it would be possible for this to happen in a world without the Internet, an online forum allows for other users to voice their approval for options that they might otherwise not have thought of, giving Hussie the ability to judge what the readers want. But even elements of discussion that are not necessarily suggestions can generate plot points; the apocalyptic nature of the story was originally unplanned and came about at least partly as a result of discussion on the forums about the posters on the walls of one of the main characters for apocalypse-themed movies.</p>
<p>The various Flash animations and other non-static content that AH occasionally uses to enhance the story are another element of MSPA that fundamentally would not work in a traditional print comic. Although they do not necessarily advance the story any better than a series of corresponding still images would, they make the story more enjoyable and immersive; the end-act flashes are probably the quintessential example of this, reminding the reader of the various active story threads, while providing a bit of progression in each of them; it&#8217;s far more effective than a series of still panels could ever hope to be. And the Flash animation/game not only could not be executed without the internet, it positively <strong>requires</strong> the high-bandwidth connections of today&#8217;s modern Internet infrastructure. The soundtracks to the Flash animations are also a key part of the overall &#8216;experience&#8217;, even though Andrew Hussie himself does not compose them; the collaboration between artist and composer is only possible through the Internet.</p>
<p>Although MSPA is certainly not the first comic to use the internet, or even the first one to use it beyond as a medium for publishing images (other comics have certainly had associated discussion forums), I believe that it&#8217;s the first one to truly use the full potential of the Internet. And while that doesn&#8217;t necessarily make it better than other ones, it definitely moves it from the realm of good to that of great.</p>
<p>Note that I have said that it is one of the few true webcomics, not the only one. The only other one that comes to mind is <a href="http://www.kidradd.com">Kid Radd</a>, which makes extensive use of animation, especially in the later strips, where almost every &#8216;panel&#8217; is a three-second animation. But it didn&#8217;t use Flash, or user suggestions, so as good as it is, I don&#8217;t consider it to use the Internet in the same way that MS Paint Adventures does.</p>
<img src="http://feeds.feedburner.com/~r/AmateurTopologist/~4/DyM6YVroeHY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2010/03/04/ms-paint-adventures-one-of-the-first-true-webcomics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.amateurtopologist.com/2010/03/04/ms-paint-adventures-one-of-the-first-true-webcomics/</feedburner:origLink></item>
		<item>
		<title>The end of Tonal Tuesday</title>
		<link>http://feedproxy.google.com/~r/AmateurTopologist/~3/5ib-NPmhYMM/</link>
		<comments>http://www.amateurtopologist.com/2010/03/02/the-end-of-tonal-tuesday/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 21:38:58 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Meta]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=719</guid>
		<description><![CDATA[Tonal Tuesday was something that I decided to do when I was going through a creativity drought as a means of making sure that something would always get posted weekly in hopes of inspiring me; although it seems to have failed that, I am getting back into the swing of finding things to write about, [...]]]></description>
			<content:encoded><![CDATA[<p>Tonal Tuesday was something that I decided to do when I was going through a creativity drought as a means of making sure that <em>something</em> would always get posted weekly in hopes of inspiring me; although it seems to have failed that, I am getting back into the swing of finding things to write about, so I&#8217;m not going to be doing it anymore. Plus it&#8217;s a little embarrassing seeing it being the largest category of posts on the site.</p>
<img src="http://feeds.feedburner.com/~r/AmateurTopologist/~4/5ib-NPmhYMM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2010/03/02/the-end-of-tonal-tuesday/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.amateurtopologist.com/2010/03/02/the-end-of-tonal-tuesday/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 2.156 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-08-30 23:03:31 -->
