<?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>maryrosecook</title>
	<atom:link href="http://www.maryrosecook.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.maryrosecook.com</link>
	<description></description>
	<lastBuildDate>Sun, 08 Aug 2010 14:14:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Pistol Slut, second demo</title>
		<link>http://www.maryrosecook.com/post/pistol-slut-second-demo</link>
		<comments>http://www.maryrosecook.com/post/pistol-slut-second-demo#comments</comments>
		<pubDate>Sat, 07 Aug 2010 23:21:16 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/?p=311</guid>
		<description><![CDATA[This is the second demo of Pistol Slut, the 2D, shoot-em-up platformer I&#8217;m writing in JavaScript. You can play it at pistolslut.com. The game now has a mortal enemy who can shoot, take cover and be suppressed by incoming fire. So, Pistol Slut can keep the enemy pinned down as she advances, then unleash a [...]]]></description>
			<content:encoded><![CDATA[<p><object width="500" height="578"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13966464&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=13966464&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="578"></embed></object></p>
<p>This is the second demo of Pistol Slut, the 2D, shoot-em-up platformer I&#8217;m writing in JavaScript.  You can play it at <a href='http://pistolslut.com'>pistolslut.com</a>.</p>
<p>The game now has a mortal enemy who can shoot, take cover and be suppressed by incoming fire.  So, Pistol Slut can keep the enemy pinned down as she advances, then unleash a hail of bullets for the kill.  Pistol Slut is now mortal and can crouch, throw grenades and, the faster she shoots, the wilder her shots go.  After expending her magazine, she must reload.</p>
<p>Pistol Slut has paid a visit to the Sluts With Guns free shop and got an M9, Mac-10 and SPAS shotgun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/pistol-slut-second-demo/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Flashbeagle, Charlie Brown</title>
		<link>http://www.maryrosecook.com/post/its-flashbeagle-charlie-brown</link>
		<comments>http://www.maryrosecook.com/post/its-flashbeagle-charlie-brown#comments</comments>
		<pubDate>Sat, 07 Aug 2010 08:02:47 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/?p=313</guid>
		<description><![CDATA[I used to watch this when I was a child. I think my God mother gave it to me on video. The programme comprises four songs performed by characters from Peanuts. A few years ago, my friend, Dave, and I discovered a mutual appreciation. He even has a copy on DVD. We recorded a cover [...]]]></description>
			<content:encoded><![CDATA[<p>I used to watch this when I was a child.  I think my God mother gave it to me on video.  The <a href=''http://www.imdb.com/title/tt0123122/>programme</a> comprises four songs performed by characters from Peanuts.  A few years ago, my friend, Dave, and I discovered a mutual appreciation.  He even has a copy on DVD.  We recorded <a href='http://maryrosecook.playmary.com/track/grrlmageddon_lucysays'>a cover of Lucy Says</a> in the last afternoon before I moved from Leeds to London.</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/B-hjGfG_GFY&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/B-hjGfG_GFY&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="400"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/its-flashbeagle-charlie-brown/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experimanntag</title>
		<link>http://www.maryrosecook.com/post/experimanntag</link>
		<comments>http://www.maryrosecook.com/post/experimanntag#comments</comments>
		<pubDate>Thu, 15 Jul 2010 11:14:33 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/?p=315</guid>
		<description><![CDATA[Last Monday, I did the first Experimanntag for my colleagues at Ableton. I showed a film by Michael Mann and then we went to Experimontag, an experimental music club in Berlin. Next week: The Insider.]]></description>
			<content:encoded><![CDATA[<p>Last Monday, I did the first Experimanntag for my colleagues at <a href='http://ableton.com'>Ableton</a>.  I showed a film by <a href='http://www.imdb.com/name/nm0000520/'>Michael Mann</a> and then we went to <a href='http://www.myspace.com/experimontag'>Experimontag</a>, an experimental music club in Berlin.  Next week: The Insider.</p>
<p><img src='/images/experimanntag1.gif' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/experimanntag/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hurray for the Riff Raff</title>
		<link>http://www.maryrosecook.com/post/hurray-for-the-riff-raff</link>
		<comments>http://www.maryrosecook.com/post/hurray-for-the-riff-raff#comments</comments>
		<pubDate>Sun, 11 Jul 2010 19:04:05 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/?p=314</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/SEMGe9JkRqU&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/SEMGe9JkRqU&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="400"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/hurray-for-the-riff-raff/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You Died on 12th May 2009</title>
		<link>http://www.maryrosecook.com/post/you-died-on-12th-may-2009</link>
		<comments>http://www.maryrosecook.com/post/you-died-on-12th-may-2009#comments</comments>
		<pubDate>Thu, 08 Jul 2010 13:02:43 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/?p=312</guid>
		<description><![CDATA[I&#8217;ve released my solo band&#8217;s new record on CD. It has six songs and you can listen to and download it here. Or, email me your address and I&#8217;ll send you a CD in the post.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve released my solo band&#8217;s new record on CD.  It has six songs and you can <a href='http://maryrosecookmusic.com'>listen to and download it here</a>.  Or, <a href='mailto:maryrosecook@maryrosecook.com'>email me</a> your address and I&#8217;ll send you a CD in the post.</p>
<p><img src='/images/youdiedon12thmay2009.png' width='484' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/you-died-on-12th-may-2009/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pistol Slut: some details about her</title>
		<link>http://www.maryrosecook.com/post/pistol-slut-how-she-works</link>
		<comments>http://www.maryrosecook.com/post/pistol-slut-how-she-works#comments</comments>
		<pubDate>Wed, 02 Jun 2010 10:25:18 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/?p=310</guid>
		<description><![CDATA[Pistol Slut is a 2D side-scrolling shoot-em-up platformer that I am writing in JavaScript. The game is displayed by a Canvas element. It works in Google Chrome, Safari and Firefox in theory, but not Internet Explorer. Demo The most recent vaguely stable version will always be available at pistolslut.com. Framework I use The Render Engine [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://pistolslut.com'>Pistol Slut</a> is a 2D side-scrolling shoot-em-up platformer that I am writing in JavaScript.  The game is displayed by a <a href='http://en.wikipedia.org/wiki/Canvas_element'>Canvas element</a>.  It works in <A href='http://google.com/chrome'>Google Chrome</a>, <a href='http://apple.com/safari'>Safari</a> and <a href='http://getfirefox.com'>Firefox</a> in theory, but not Internet Explorer.</p>
<h3>Demo</h3>
<p>The most recent vaguely stable version will always be available at <a href='http://pistolslut.com'>pistolslut.com</a>.</p>
<h3>Framework</h3>
<p>I use <a href='http://renderengine.com'>The Render Engine</a> by Brett Fattori.  It&#8217;s a fabulous framework that handles the basics of rendering graphics and sprites to the Canvas element, moving objects, collision detection, animation and level loading.</p>
<h3>Code</h3>
<p>The Pistol Slut <a href='http://github.com/maryrosecook/pistolslut'>code</a> is open source and available on GitHub.  It would be a good reference for anyone who wants to learn about advanced capabilities of The Render Engine that aren&#8217;t covered in the demos that come with the framework: animated sprites, level object loading and enemies.</p>
<h3>Features so far</h3>
<p>A scrolling background, running, jumping, shooting, muzzle flash, bullet ricochets, enemies, snow, animated sprites, scrolling Orwellian signs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/pistol-slut-how-she-works/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pistol Slut</title>
		<link>http://www.maryrosecook.com/post/pistol-slut</link>
		<comments>http://www.maryrosecook.com/post/pistol-slut#comments</comments>
		<pubDate>Sat, 29 May 2010 08:36:25 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/?p=308</guid>
		<description><![CDATA[A demo of the pre-alpha version of my JavaScript game, Pistol Slut.]]></description>
			<content:encoded><![CDATA[<p><object width="500" height="580"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=12123249&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=12123249&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="580"></embed></object></p>
<p>A demo of the pre-alpha version of my JavaScript game, Pistol Slut.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/pistol-slut/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.maryrosecook.com/post/307</link>
		<comments>http://www.maryrosecook.com/post/307#comments</comments>
		<pubDate>Tue, 18 May 2010 13:32:04 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/307</guid>
		<description><![CDATA[I&#8217;ve just read The Insurrectional Project [PDF], a zine comprising discussions of different aspects of anarchism. I disagreed with it as much as I agreed with it, but it has set off lots of little explosions in my head.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just read <a href='http://www.natterjackpress.co.uk/downloads/pamphlets/elephant-editions/insurrectional-project.pdf'>The Insurrectional Project</a> [PDF], a zine comprising discussions of different aspects of anarchism.  I disagreed with it as much as I agreed with it, but it has set off lots of little explosions in my head.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/307/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.maryrosecook.com/post/306</link>
		<comments>http://www.maryrosecook.com/post/306#comments</comments>
		<pubDate>Tue, 11 May 2010 11:00:25 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/306</guid>
		<description><![CDATA[A very fucking cool post from Randall Munroe of xkcd about the intersection between sex, gender and categorisation.]]></description>
			<content:encoded><![CDATA[<p><a href='http://blog.xkcd.com/2010/05/06/sex-and-gender/'>A very fucking cool post</a> from Randall Munroe of <a href='http://xkcd.com'>xkcd</a> about the intersection between sex, gender and categorisation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/306/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I made Street Hoarding, a Node.js and Redis application, or, a super simple explanation of asynchronicity, event loops, non-blocking IO, JavaScript, Comet and Node</title>
		<link>http://www.maryrosecook.com/post/how-i-made-street-hoarding-a-node-js-and-redis-application-or-a-super-simple-explanation-of-asynchronicity-event-loops-non-blocking-io-javascript-and-node</link>
		<comments>http://www.maryrosecook.com/post/how-i-made-street-hoarding-a-node-js-and-redis-application-or-a-super-simple-explanation-of-asynchronicity-event-loops-non-blocking-io-javascript-and-node#comments</comments>
		<pubDate>Mon, 19 Apr 2010 00:00:16 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/?p=296</guid>
		<description><![CDATA[Second update: thanks to James Coglan again, I have modified the code. Now, the client message requests are held open until there is a new message to return, thus reducing the load on the server. Update: Thanks to James Coglan for providing some lovely technical corrections to this article. Go to the Street Hoarding homepage [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Second update:</strong> thanks to <a href='http://jcoglan.com'>James Coglan</a> again, I have modified the code.  Now, the client message requests are held open until there is a new message to return, thus reducing the load on the server.</p>
<p><strong>Update:</strong> Thanks to <a href='http://jcoglan.com'>James Coglan</a> for providing some lovely technical corrections to this article.</p>
<p>Go to the <a href='http://streethoarding.com'>Street Hoarding</a> homepage and you will see a message in big letters.  If you wish, you can type another message in the text box at the bottom of the page, press return, and see it take the place of the old message.  Anyone else on the site at that moment will see your words within a few hundredths of a second.  It&#8217;s kind of like a community pin-up board, or some hoarding on a building site, or a promiscuous IM client with a very short memory.</p>
<p>Some of the key parts of the <a href='http://github.com/maryrosecook/streethoarding'>code</a> were taken from Ryan Dahl&#8217;s demo <a href="http://chat.nodejs.org/">chat app</a> for Node.js.</p>
<p>My aim with this article is to explain how everything works to someone who is like I was before I wrote Street Hoarding: hazy about asynchronicity, event loops, non-blocking IO, JavaScript and <a href='http://nodejs.org'>Node.js</a>.</p>
<p>There are two elements: the client and the server.</p>
<h3>The client</h3>
<p>This is an HTML page that lays out the main message and the text box.  It is also the JavaScript that runs on the user&#8217;s browser.  The JavaScript has two key functions.</p>
<p><script src="http://gist.github.com/336937.js?file=longPoll.js"></script></p>
<p><code>longPoll()</code> runs the whole time the user has the webpage open.  It takes some data.  If this data is null, it is ignored.  If it is not null and has a message component, that message is displayed on the webpage through a jQuery update to the message div.  Either way, an XMLHttpRequest request is then made with jQuery to the <code>/latest_message</code> url on the server.  This request takes some time, but it is asynchronous.  That is very important.  When <code>longPoll()</code> is run, the data is processed, the URL request is made and, then, the execution of <code>longPoll()</code> continues past the <code>$.ajax()</code> call, and control is passed back to the computer processor so it can carry on doing other work.  When a success response comes back, the success function inside the <code>$.ajax()</code> function is run.  This pauses for a moment, then calls <code>longPoll()</code> again, passing it the data that the server responded with.  Next time through, the message inside this data will be written to the HTML page and the user will see it.</p>
<p><script src="http://gist.github.com/336937.js?file=tryToSendMessage.js"></script></p>
<p><code>tryToSendMessage()</code> is called when the user submits a new message via the text field on the HTML page.  It first sends an (asynchronous, as always) request to the server to ask it whether the message the user entered has ever been said before.  If it has, it just tells the user they aren&#8217;t being original and finishes.  Otherwise, it sends an (asynchronous) request to the <code>/send_message</code> URL, passing the user&#8217;s message as a parameter, thus telling the server to save the message.</p>
<p>There are some improvements that could be made to this code.  First, when the message is sent to the server, it does not get updated in the user&#8217;s browser immediately.  That will have to wait until the <code>longPoll()</code> function gets its next response from the server.  Second, the user has no idea whether the <code>/send_message</code> request was successful until <code>longPoll()</code> updates the webpage.  Third, the message is actually sent twice.  The uniqueness check request and send message request could have been combined into a single <code>/send_message</code> request that had the server respond with either an indication of success or a message saying that the message was not unique.</p>
<p>I keep on saying the word asynchronous.  Everyone who talks about Node.js goes on about asynchronous execution and this other thing, non-blocking input and output (IO).  What is crazy is that we haven&#8217;t even got to the Node.js stuff, yet.  This is all browser magic that we&#8217;ve had for the last whatever years.</p>
<p>So, let&#8217;s go back a bit.</p>
<p>When a request goes from the client to the server &#8211; either asking for the latest message or sending a new message &#8211; the computer processor doesn&#8217;t hang around waiting for a response.  Instead, it moves on and deals with other tasks.  The processor returns its attention to the request when the response comes in.  Thus, the input and output are non-blocking.  Which is to say, waiting for data to arrive or be sent does not hold the processor up from its other tasks.  From this, we get asynchronicity &#8211; lines of code can get executed out of order.  If there is a pause whilst a function waits for something to happen and that something does not require the computer&#8217;s processor, other work can be done in the meantime.</p>
<p>How does this work?</p>
<p>There is this thing called an event loop and every browser has one.  This is a function that just goes around and around, taking note of things that happen like a woman alone in a house at night straining to hear every floorboard creak and passerby&#8217;s creep.  Code, like jQuery, that is running is the browser, can register its interest in different types of event.  So, when the <code>$.ajax()</code> jQuery function is called in <code>longPoll()</code>, it sends out the request and then tells the event loop it would be very interested in hearing about any HTTP responses that come back from the server.  The event loop eventually gets the response and passes it to jQuery which looks at the response to see if the request was a success, and then runs one of the two functions that we defined in <code>longPoll()</code>.</p>
<p>This is where JavaScript plays its part.  JavaScript has &#8211; and you may have heard this term before &#8211; first class functions. These confer several abilities, but the one we care about is that functions can be passed as arguments.  In <code>longPoll()</code>, functions are passed as the fifth and sixth properties of the <code>$.ajax()</code> call.  The first is to be run in the case of a response that indicates an error, the second in the case of a successful response.</p>
<p>Now, back to the request from our client code.  Using a browser means we are in an event loop.  Making an HTTP request means we have time when the processor is not being used.  Using jQuery means that control is handed back to the browser after a request is sent.  The browser regaining control means we have non-blocking IO.  Non-blocking IO means that the event loop continues to run whilst it awaits a response.  The event loop continuing to run means that other tasks can be dealt with in the mean time.</p>
<p>That deals with the wonders of non-blocking IO and asynchronicity on the client.  If we already have all that stuff, I ask, Why is Node.js so special? and I answer, Because this is now easy to do on the server, too.</p>
<h3>The server</h3>
<p><script src="http://gist.github.com/336937.js?file=latest_message.js"></script></p>
<p>There is some crazy fucking shit going on in the first line.  It uses fu, an imported piece of JavaScript code that acts as a mini router.  When you pass a url and a function to <code>fu.get()</code>, you are saying: when the Node.js server gets a request that was sent to this URL, run this function.  </p>
<h4>A digression on how the router works that explains some things about and JavaScript and the Street Hoarding code but that it&#8217;s not really necessary to read to get the main points of this article</h4>
<p><script src="http://gist.github.com/336937.js?file=fu.js"></script></p>
<p><code>fu.get()</code> takes a URL and a function and adds the function to a hash, keyed with the URL.  <code>fu.listen()</code> starts the server defined by the server variable and makes it listen to events coming to the passed host (probably localhost) on the passed port.  We&#8217;ve eaten our way around the jam filling, so it&#8217;s time to get sticky fingers.</p>
<p><code>createServer()</code>, a Node.js function, is called with an anonymous function that takes a request and response, and the resulting server object is assigned to the server variable.  That anonymous function gets the URL on the passed request object, <code>req</code>, and looks in <code>getMap</code> to find the corresponding function to run.  For example, in the latest message code defined above, the url is <code>/latest_message</code> and the function is the rest of the code snippet.</p>
<p>We now meet a second special feature of JavaScript: prototyping.  The passed response object, <code>res</code>, has two new methods added to it on the fly: <code>simpleText()</code> and <code>simpleJSON()</code>.  The methods themselves are not that interesting &#8211; they just create a string to return to the client as a response to its request &#8211; it is the fact that they are stuck on the <code>res</code> object without such as a by your leave that I just know is making your head explode.</p>
<p>Finally, the handler function in <code>getMap</code> that corresponded to the requested url is called with the request and the super-charged-with-new-functions response.</p>
<h4>Latest message</h4>
<p><script src="http://gist.github.com/336937.js?file=latest_message.js"></script></p>
<p>So, the function passed to <code>fu.get()</code> extracts the since parameter that the client sent with the request.  This indicates when the client last received a user message from the server.  If the server has received a message from a user since then, <code>sendLatestMessageToClient()</code> is called.  </p>
<p><script src="http://gist.github.com/336937.js?file=sendLatestMessageToClient.js"></script></p>
<p><code>sendLatestMessageToClient()</code> creates a new Redis client.  It calls <code>redisClient.stream.addListener()</code> to connect the Redis client to the Redis server, passing a function as the second argument.  Note the asynchronicity.  The Redis library does not hang around waiting while the Redis client connects to the Redis server.  Instead, behind the scenes, it passes control back to the server event loop which, at some point in the future, gets an I&#8217;ve Finished My Work And My Name Is The Redis Client Connection Function event which then calls the function passed as the second argument.</p>
<p>This function calls <code>redisClient.lindex()</code> which retrieves the first item in the messages list in the database.  Three arguments are passed: the key of the messages list, a <code>0</code> to indicate the first item in the list, and yet another callback function.  <code>redisClient.lindex()</code> retrieves the first message (did you notice the auxiliary bout of asynchronicity?), and the callback is run which closes the Redis client and runs the <code>simpleJSON()</code> function to send the message back to the client.  (Those of us who read the digression are like fully in a special secret club what knows how totally mind-fucking it is that the <code>res</code> object has a <code>simpleJSON()</code> function hanging around on it; those who did not read the digression will keep their heads fuck-free.)</p>
<h4>New message</h4>
<p><script src="http://gist.github.com/336937.js?file=send_message.js"></script></p>
<p>The function passed to <code>fu.get()</code> extracts the message from the request and calls <code>storeMessage()</code>, passing the message and yet another function to call back later.</p>
<p><script src="http://gist.github.com/336937.js?file=storeMessage.js"></script></p>
<p><code>storeMessage()</code> goes through the familiar routine of creating a Redis client, requesting a connection to the Redis server, calling a Redis function (<code>redisClient.lpush</code>, this time), closing the Redis client and calling back the function passed as the second argument which:</p>
<p>Wait, stop a second.  Do you remember how I rather trailed off five paragraphs ago when I wrote, &#8220;If the server has received a message from a user since then, <code>sendLatestMessageToClient()</code> is called&#8221;?  By which I mean, I didn&#8217;t say what happened if the server had not received a new message since the last message was sent to the user.  Let&#8217;s have a look.</p>
<p><script src="http://gist.github.com/336937.js?file=latest_message.js"></script></p>
<p>Right.  Latest message requests that would normally be answered with the message that the client is already displaying are held open.  I know that was a long sentence, and this is a long article, and you are tired, but I hope that those last two words didn&#8217;t slip by you.  Held open.  A response is not sent immediately.  Instead, a new item is pushed onto the <code>messageRequests</code> array: a hash of the <code>res</code> object and the <code>sendLatestMessageToClient()</code> function.</p>
<p><script src="http://gist.github.com/336937.js?file=send_message.js"></script></p>
<p>So, back to the <code>/send_message</code> code to see how it deals with the held message requests.  The code extracts the user&#8217;s message, stores it and sends a success response back to the client.  For each message request that has been pushed onto <code>messageRequests</code>, <code>sendLatestMessageToClient()</code> is called.  This sends the latest message (probably the one received a few lines ago) back to the client, thus ending the request.  This is Comet: the client sends a request and no response is sent until there is something useful to send, thus the request is held open.</p>
<p>Ryan Dahl did two really cool things.  First, he wrote a library that lets you code an event-driven server in JavaScript.  However, this was not new.  Second, and more importantly, he wrote the core libraries so that they are non-blocking.  The problem with other event-driven programming libraries is that you can&#8217;t be sure whether the auxiliary libraries you want to use are non-blocking.  If they are, you will stall your event loop and it will stop dealing with incoming events and everything will fall apart.</p>
<p>So, from the re-written libraries, we get non-blocking IO, which allows an event loop.  The event loop allows the server to run in a single process.  A single process means low memory usage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/how-i-made-street-hoarding-a-node-js-and-redis-application-or-a-super-simple-explanation-of-asynchronicity-event-loops-non-blocking-io-javascript-and-node/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Maybe pretend that you&#8217;re in the grocery store having to defend your queer body.&#8221;</title>
		<link>http://www.maryrosecook.com/post/304</link>
		<comments>http://www.maryrosecook.com/post/304#comments</comments>
		<pubDate>Mon, 12 Apr 2010 21:51:19 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/304</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="500" height="395"><param name="movie" value="http://www.youtube.com/v/RAzWydl7FzA&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/RAzWydl7FzA&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="395"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/304/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Freeing disk space on your Linux server</title>
		<link>http://www.maryrosecook.com/post/freeing-disk-space-on-your-linux-server</link>
		<comments>http://www.maryrosecook.com/post/freeing-disk-space-on-your-linux-server#comments</comments>
		<pubDate>Fri, 09 Apr 2010 13:54:30 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/?p=303</guid>
		<description><![CDATA[The websites that I host on Slicehost, Playmary and Street Hoarding, keep crashing because my slice keeps running out of disk space. To find out where disk space is being used: 1. Get to the root of your machine by running cd / 2. Run sudo du -h --max-depth=1 3. Note which directories are using [...]]]></description>
			<content:encoded><![CDATA[<p>The websites that I host on <a href='http://slicehost.com'>Slicehost</a>, <a href='http://playmary.com'>Playmary</a> and <a href='http://streethoarding.com'>Street Hoarding</a>, keep crashing because my slice keeps running out of disk space.</p>
<p>To find out where disk space is being used:</p>
<p>1. Get to the root of your machine by running <code>cd /</code><br />
2. Run <code>sudo du -h --max-depth=1</code><br />
3. Note which directories are using a lot of disk space.<br />
4. <code>cd</code> into one of the big directories.<br />
5. Run <code>ls -l</code> to see which files are using a lot of space. Delete any you don&#8217;t need.<br />
6. Repeat steps 2 to 5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/freeing-disk-space-on-your-linux-server/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fourth EP</title>
		<link>http://www.maryrosecook.com/post/fourth-ep</link>
		<comments>http://www.maryrosecook.com/post/fourth-ep#comments</comments>
		<pubDate>Wed, 07 Apr 2010 14:34:41 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/?p=301</guid>
		<description><![CDATA[I finished the new mary rose cook music record months ago, but, since moving to Berlin, I haven&#8217;t got around to photocopying the inlays and burning the CDs and doing the stapling. Soon. I wrote the note in the photograph and pinned it to my bedroom wall when I came back to London, two months [...]]]></description>
			<content:encoded><![CDATA[<p>I finished the new <a href='http://maryrosecookmusic.com'>mary rose cook music</a> record months ago, but, since moving to Berlin, I haven&#8217;t got around to photocopying the inlays and burning the CDs and doing the stapling.  Soon.</p>
<p><img src='http://maryrosecook.com/images/youdiedon12thmay2009.png' width='500'/></p>
<p>I wrote the note in the photograph and pinned it to my bedroom wall when I came back to London, two months after <a href='http://www.maryrosecook.com/post/when-i-died-2'>having a cardiac arrest</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/fourth-ep/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Say you want an insurrection</title>
		<link>http://www.maryrosecook.com/post/say-you-want-an-insurrection-2</link>
		<comments>http://www.maryrosecook.com/post/say-you-want-an-insurrection-2#comments</comments>
		<pubDate>Tue, 16 Mar 2010 23:04:07 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/say-you-want-an-insurrection-2</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/say-you-want-an-insurrection-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Des Ark</title>
		<link>http://www.maryrosecook.com/post/143</link>
		<comments>http://www.maryrosecook.com/post/143#comments</comments>
		<pubDate>Tue, 16 Mar 2010 23:05:31 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/143</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/JmYdix-XGmg&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/JmYdix-XGmg&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/143/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://www.maryrosecook.com/post/111</link>
		<comments>http://www.maryrosecook.com/post/111#comments</comments>
		<pubDate>Tue, 09 Mar 2010 01:32:51 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/111</guid>
		<description><![CDATA[I have just added my first Playmary track that includes an image as the comment. I have no idea why I haven&#8217;t done this before. This evening, I got off the U-Bahn at Görlitzer Bhf. and My Hometown by Bruce Springsteen came on my headphones and I looked down the platform and saw the clear, [...]]]></description>
			<content:encoded><![CDATA[<p>I have just added my first Playmary track that <a href="http://maryrosecook.playmary.com/track/brucespringsteen_myhometown">includes an image as the comment</a>.  I have no idea why I haven&#8217;t done this before.<br />
<br/><br/><br />
This evening, I got off the U-Bahn at Görlitzer Bhf. and My Hometown by Bruce Springsteen came on my headphones and I looked down the platform and saw the clear, twilight Berlin sky and the sun falling out of the sky.  I stood a moment to take a photograph.<br />
<br/><br/><br />
<img src="http://www.maryrosecook.com/images/IMG_1824.JPG" width=500></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/111/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Syndicate</title>
		<link>http://www.maryrosecook.com/post/syndicate-4</link>
		<comments>http://www.maryrosecook.com/post/syndicate-4#comments</comments>
		<pubDate>Sat, 06 Mar 2010 01:31:55 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/syndicate-4</guid>
		<description><![CDATA[I have just re-discovered Syndicate and spent the afternoon playing a graphically crippled SNES version on my MacBook Pro. You can get the emulator here and the ROM here. I played Syndicate on my PowerMac when I was fifteen. I have no idea where I got my copy &#8211; it was an old game even [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://maryrosecook.com/images/syndicate.gif" alt="" width="500" /></p>
<p>I have just re-discovered Syndicate and spent the afternoon playing a graphically crippled SNES version on my MacBook Pro.  You can get the emulator <a href="http://www.snes9x.com/">here</a> and the ROM <a href="http://www.completeroms.com/Rompages/Snesusa/S/syndicate.html">here</a>.</p>
<p>I played Syndicate on my PowerMac when I was fifteen.  I have no idea where I got my copy &#8211; it was an old game even then.  I was in love with it and another game, Myth II, around the same time.</p>
<p>Though they are very different, I liked the same things about them: they let you use a few basic tools to create your own stories and solve problems in your own way, and they are set in a world that makes you lick your lips.</p>
<p><img src="http://maryrosecook.com/images/Myth-II-Soulblighter_1.jpg" alt="" width="500" /></p>
<p>In Myth II, you have archers with flaming arrows and dwarves with satchel charges.  You can light the grass on fire to corral the enemy into a narrow gully.  You can use the satchel charges to blow up the front and back of a company of enemy soldiers, trapping the survivors in the middle.  You can lure the enemy into an area and then tell your archers to fire their flaming arrows to ignite hidden charges.</p>
<p>You can create your own scenarios of destruction, and plot the enemy&#8217;s demise like a story.  Once you get good at a level, the carnage takes on an air of theatre, of ballet.</p>
<p>Each level in Myth II is just about wiping out the enemy&#8217;s army, but Syndicate gives you more story to work with.  The hyper-capitalist company for which you work needs a politician assassinating.  He is to attend a mega-mall opening.  You could lie in wait by the road and blow up his car as he passes.  Or, you could hide your guns and blend in with the crowd and shoot him as he cuts the ribbon and then escape in his limousine.  Or, you could take over the minds of his bodyguards and get them to kill him for you, then slip away unnoticed.</p>
<p><img src="http://maryrosecook.com/images/myth.jpg" alt="" width="500" /></p>
<p>Though Myth II has very little story in the levels, the mise-en-scène is wonderful.  The landscapes are so barren.  They are like the muddy no man&#8217;s land between the trenches in the First World War.  Their sparseness draws attention to the soldiers like a stage draws attention to the actors.  The environment dictates the story as in the theatre-like battle-fields of Flags of Our Fathers, or the cold Detroit in Narc that made the world into an inhospitable place that left the characters naked and aggressive and scared, a place where things happen that no one will see.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/syndicate-4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting thrown out of a lesbian bookshop</title>
		<link>http://www.maryrosecook.com/post/getting-thrown-out-of-a-lesbian-bookshop-4</link>
		<comments>http://www.maryrosecook.com/post/getting-thrown-out-of-a-lesbian-bookshop-4#comments</comments>
		<pubDate>Thu, 04 Mar 2010 01:30:58 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/getting-thrown-out-of-a-lesbian-bookshop-4</guid>
		<description><![CDATA[This evening, my colleague, Mike, and I left the Ableton office and got on the U-Bahn. We battled through the cold, found the right street, then the right number, then followed someone into the right building. We came up the stairs and into the lesbian bookshop. There was to be a showing of Tan de [...]]]></description>
			<content:encoded><![CDATA[<p>  This evening, my colleague, Mike, and I left the Ableton office and got on the U-Bahn.  We battled through the cold, found the right street, then the right number, then followed someone into the right building.</p>
<p>We came up the stairs and into the lesbian bookshop.  There was to be a showing of <a href="http://www.imdb.com/title/tt0324158/">Tan de repente</a>, an Argentinian film about two punk rock girls who take a saleswoman on a road trip and try and seduce her.</p>
<p>We found a few women hanging around, one of them in debate with a bloke.  My German is not great, but it became clear that men are not allowed in the lesbian bookshop.  So, my colleague, the other guy and I left.</p>
<p>I was once involved in organising a feminist health weekender that was for women and woman-identified trans people only.  I felt that the event suffered because of that policy: the perspectives and ideas of my male friends were missing.  Further, I don&#8217;t see how such a policy can be anything other that bigoted: it&#8217;s prejudice in the literal sense, pre judgement.</p>
<p>The most frequently used justification for such a policy is based on creating safe spaces.  If you exclude those who a group feels could impinge on their freedom, you create a haven where people can act and think as they wish without fear of harm.</p>
<p>However, I think this is mistaken.  Just as much harm can come from those within a community as from those without.  Therefore, no security is gained for the loss in freedom.</p>
<p>It seems far more practical and inclusive to let the group decide what kind of behaviour is acceptable and then deal with any grievances if they arise.</p>
<p>I once helped to run a queer party in a social centre.  The venue had three policies: everyone was equal, and there were to be no bigoted language and no violence.  The key was that these policies gave everyone a hint on how they should behave, but were so vague that problems could be dealt with on a case by case basis, without reference to rules.</p>
<p>This meant that the queer party had no requirements of queerness.  However, when some drunk guys came in at four in the morning and one of them made a personal remark that my friend found offensive, it was perfectly OK to ask them to leave.</p>
<p>There are a few cases where exclusion seems reasonable.  I read about another feminist gathering where the sexual abuse survivor workshop was for survivors of abuse only.  Counselling, and consultations with solicitors and doctors are protected by law.  The common element seems to be that these are purely about private matters.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/getting-thrown-out-of-a-lesbian-bookshop-4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing an mp3 crawler in Clojure</title>
		<link>http://www.maryrosecook.com/post/writing-an-mp3-crawler-in-clojure-4</link>
		<comments>http://www.maryrosecook.com/post/writing-an-mp3-crawler-in-clojure-4#comments</comments>
		<pubDate>Sat, 27 Feb 2010 01:29:01 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/writing-an-mp3-crawler-in-clojure-4</guid>
		<description><![CDATA[I&#8217;ve written an mp3 crawler to help me learn Clojure. It&#8217;s 150 lines. I&#8217;m sure could be much shorter. There are some URL parsing bugs. Like all my projects, the code I talk about in this article is open source. Get it from GitHub. The basic flow Start with a URL, like saidthegramophone.com Request the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written an mp3 crawler to help me learn Clojure.  It&#8217;s 150 lines.  I&#8217;m sure could be much shorter.  There are some URL parsing bugs.</p>
<p>Like all my projects, the code I talk about in this article is open source.  <a href="http://github.com/maryrosecook/scrawl">Get it from GitHub</a>.</p>
<h3>The basic flow</h3>
<ol>
<li>Start with a URL, like saidthegramophone.com</li>
<li>Request the page and find all the URLs on it.</li>
<li>Save all the ones that point at mp3s.</li>
<li>Note down how many mp3s were yielded.</li>
<li>Throw away ones that definitely don&#8217;t point at other HTML pages (images, Javascript).</li>
<li>Throw away ones that are at hosts that don&#8217;t seem to yield many mp3s.</li>
<li>Add the rest to the list of URLs to crawl.</li>
<li>Go to step 2 with the next item on that list.</li>
</ol>
<h3>Interesting points</h3>
<h4>Agents</h4>
<p>URLs are requested by asynchronous agents in batches of twenty.  Thus, they can be crawled much more quickly.  <code>crawl-batch-of-urls</code> maps the twenty items in <code>urls-to-crawl</code> to the <code>request-url</code> function.  This function creates a new http-agent and tells it to download the (HTML) content at the url.  <code>crawl-batch-of-urls</code> then waits up to ten seconds for all the agents in the batch to finish, then passes them back.</p>
<p><script src="http://gist.github.com/316641.js?file=agents.clj"></script></p>
<h4>Host scores</h4>
<p>A record is kept of the mp3-richness of each host the crawler encounters.  Each mp3 found on a host scores it a point.  Each crawl of a URL on the host loses it a point. So, say <a href="http://www.saidthegramophone.com/archives/in_this_box_or_another.php">www.saidthegramophone.com/archives/in_this_box_or_another.php</a> was crawled and five mp3s were found, four points would be added to the score for <a href="http://www.saidthegramophone.com">www.saidthegramophone.com</a></p>
<p><code>update-host-scores</code> updates a hash of hosts and scores after a new URL is crawled:</p>
<p><script src="http://gist.github.com/316641.js?file=update-host-scores.clj"></script></p>
<p><code>gen-host-scores</code> &#8211; </p>
<p><script src="http://gist.github.com/316641.js?file=gen-host-scores.clj"></script></p>
<p>- is called twice at the beginning of the program&#8217;s execution:</p>
<p><script src="http://gist.github.com/316641.js?file=gen-host-scores-exec.clj"></script></p>
<p>Each time through the main execution loop, the urls crawled and urls saved thus far are written to disk.  Thus, for the first call, an empty hash map is the starting point and each of the urls crawled costs its host one point.  The second time, the hash of scores calculated the first time is the starting point and each of the mp3s found scores its host one point.</p>
<h4>Being encouraged to think better</h4>
<p>Through its immutable data structures and passable functions, Clojure is always pushing me to re-use code and employ recursion.  I felt very cool when I was able to write the following function that accepts a function to filter a sequence:</p>
<p><script src="http://gist.github.com/316641.js?file=remove-dupes-and-unwanted.clj"></script></p>
<h4>The main loop</h4>
<p>Scrawl, the function that runs the show.  If the list of passed url-crawl-agents is empty, a new batch is created and <code>scrawl</code> is called again.  If the next agent on the list failed to complete its data request, it is thrown away and <code>scrawl</code> is called again.  Otherwise, the function calculates all the required data and calls itself.</p>
<p><script src="http://gist.github.com/316641.js?file=scrawl.clj"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/writing-an-mp3-crawler-in-clojure-4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fare-dodging on the Berlin U-Bahn</title>
		<link>http://www.maryrosecook.com/post/fare-dodging-on-the-berlin-u-bahn-4</link>
		<comments>http://www.maryrosecook.com/post/fare-dodging-on-the-berlin-u-bahn-4#comments</comments>
		<pubDate>Fri, 19 Feb 2010 01:28:04 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/fare-dodging-on-the-berlin-u-bahn-4</guid>
		<description><![CDATA[I&#8217;ve had my ticket checked by an inspector on the Berlin U-Bahn 4 times in 36 days. I&#8217;ve done maybe 90 (36 x 2.5) journeys in that time. The penalty for travelling without a ticket is €40 and a shouting-at. Using the estimate for the number of journeys I&#8217;ve made, I&#8217;ve spent €190 on travel. [...]]]></description>
			<content:encoded><![CDATA[<p>  I&#8217;ve had my ticket checked by an inspector on the Berlin U-Bahn 4 times in 36 days.  I&#8217;ve done maybe 90 (36 x 2.5) journeys in that time.  The penalty for travelling without a ticket is €40 and a shouting-at.  Using the estimate for the number of journeys I&#8217;ve made, I&#8217;ve spent €190 on travel.  Therefore, provided I could stand up to the shouting, it would have been better to eat the fines.</p>
<p>There are certainly patterns to the ticket inspectors&#8217; movements.  They are probably most frequently seen during rush hours, and second-most frequently during office hours.  They are either assigned &#8220;beats&#8221;, or they choose their own.  Either allows prediction of their movements.</p>
<p>My first thought was to make a site that let people log ticket inspector sightings: line, time, station.  That way, you could figure out the low risk routes and the low risk times.  However, if such a data source was public, the BVG [the organisation that runs the public transport in Berlin] could easily change their habits to catch people out.</p>
<p>My second thought was to make a website that let people share their inspector sightings with a trusted group of friends.  That way, if one group were compromised by the BVG, they would not compromise the data of the other groups.</p>
<p>The difficulty with this approach is that it&#8217;s not viable for people who can&#8217;t afford the fine.  In <a href="http://www.crimethinc.com/texts/rollingthunder/insurrection.php">this wonderful article about insurrection</a>, I read about a fare dodgers&#8217; union in Stockholm.  The dues are 100 kronor a month, as opposed to 500 kronor for a monthly ticket, and, if you get caught, the union pays the fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/fare-dodging-on-the-berlin-u-bahn-4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bands are better live</title>
		<link>http://www.maryrosecook.com/post/bands-are-better-live-3</link>
		<comments>http://www.maryrosecook.com/post/bands-are-better-live-3#comments</comments>
		<pubDate>Sun, 07 Feb 2010 01:26:13 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/bands-are-better-live-3</guid>
		<description><![CDATA[I go to gigs/concerts/shows a lot. Gigs are just better than records. There is the sound of the audience booing or chatting or whooping or heckling or clapping. Listen to the effect that the audience had on Bob Dylan at his &#8220;Royal Albert Hall&#8221; gig in 1966. You can see the musicians making their music [...]]]></description>
			<content:encoded><![CDATA[<p>  I go to gigs/concerts/shows a lot.  Gigs are just better than records.</p>
<p>There is the sound of the audience booing or chatting or whooping or heckling or clapping.  Listen to the effect that the audience had on Bob Dylan at his <a href="http://en.wikipedia.org/wiki/The_Bootleg_Series_Vol._4:_Bob_Dylan_Live_1966,_The_%22Royal_Albert_Hall%22_Concert">&#8220;Royal Albert Hall&#8221; gig</a> in 1966.</p>
<p>You can see the musicians making their music in front of you: how that ringing guitar sound is produced, or how he pulls of that riff, or how the drum player and the bass player have to make eye contact before the time signature change.  I saw Battles play at All Tomorrow&#8217;s Parties last year and saw that Ian Williams does actually play the keyboard and guitar simultaneously.</p>
<p>The musicians play with more conviction because they are performing and they are having an effect not just on the air but on the people in front of them, and the low lights and emotional atmosphere give them license to scream the scream they felt when they first wrote the song.</p>
<p>The songs are different versions from those played on the record six months before because they can be adjusted in response to a changing idea of what sounds good, or at the discovery of a richer melody or simpler arrangement.  The album version of Sunset Rubdown&#8217;s Us Ones In Between has the piano marking out the melody and the rhythm.  However, <a href="http://www.youtube.com/watch?v=Tv-_4xNEDck">this live version</a> has the piano nowhere and the song completely driven by a guitar string being alternately tightened and loosened.</p>
<p>Perhaps most tellingly, if a band has a live album, it is usually my favourite.  Here are some examples on <a href="http://live.playmary.com">a special Playmary I made</a>.</p>
<p>Audio recordings capture a good portion of the musical advantages of live gigs.  YouTube is great for gig videos, but the experience is too diffused by video-hopping and varying sound quality and the ten minute limit: songs are good, albums are great.</p>
<p>I&#8217;m not quite sure where this is leading.</p>
<p>Famous bands are well documented and, just as importantly, well distributed.  It is easy to buy a Bruce Springsteen or Bob Dylan live album.  What if every gig was recorded and then put up on the &#8216;net? A lead going from the sound desk into a cassette recorder and, later, a<br />
lead from the cassette recorder to a computer would be enough.  A quick upload to a website and it would be available to everyone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/bands-are-better-live-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Addiction is&#8230;</title>
		<link>http://www.maryrosecook.com/post/addiction-is-2</link>
		<comments>http://www.maryrosecook.com/post/addiction-is-2#comments</comments>
		<pubDate>Sun, 07 Feb 2010 01:25:17 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/addiction-is-2</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/addiction-is-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom additions to the Firefox dictionary from the last two weeks</title>
		<link>http://www.maryrosecook.com/post/custom-additions-to-the-firefox-dictionary-from-the-last-two-weeks-3</link>
		<comments>http://www.maryrosecook.com/post/custom-additions-to-the-firefox-dictionary-from-the-last-two-weeks-3#comments</comments>
		<pubDate>Sun, 31 Jan 2010 01:24:23 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/custom-additions-to-the-firefox-dictionary-from-the-last-two-weeks-3</guid>
		<description><![CDATA[Bürgeramt, emphasise, limonade, afterwards, eco, maryrosecookmusic, Afterwards, perceptron, fantasised, vokü, Temazepam, houmous, deoxygenated, lasagne, Friedrichshain, paralyse, bassy, dreamt, Skype, unsynchronised, organise, theatre, crescendoed, mojitos, yoghurts, Kensington, centred, realised, skittery, Facebook, unconferences, strappy, incongruent, Kreuzkölln, dicksuck, Kreuzberg, Orangienstr, Pilsner, Serpico, texted, Playmary, miaow, spelt, ungirlfriend, Blonde, CDs, analysing, Doulton.]]></description>
			<content:encoded><![CDATA[<p>  Bürgeramt, emphasise, limonade, afterwards, eco, maryrosecookmusic, Afterwards, perceptron, fantasised, vokü, Temazepam, houmous, deoxygenated, lasagne, Friedrichshain, paralyse, bassy, dreamt, Skype, unsynchronised, organise, theatre, crescendoed, mojitos, yoghurts, Kensington, centred, realised, skittery, Facebook, unconferences, strappy, incongruent, Kreuzkölln, dicksuck, Kreuzberg, Orangienstr, Pilsner, Serpico, texted, Playmary, miaow, spelt, ungirlfriend, Blonde, CDs, analysing, Doulton.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/custom-additions-to-the-firefox-dictionary-from-the-last-two-weeks-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding keyboard control to Playmary</title>
		<link>http://www.maryrosecook.com/post/adding-keyboard-control-to-playmary-3</link>
		<comments>http://www.maryrosecook.com/post/adding-keyboard-control-to-playmary-3#comments</comments>
		<pubDate>Tue, 05 Jan 2010 01:23:26 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/adding-keyboard-control-to-playmary-3</guid>
		<description><![CDATA[Playmary is my audio autobiography site. You create an account and upload songs that you are listening to a lot, or that symbolise what is going on in your life. Up until now, you would click on songs to play and pause them, and when one song ended, the next would play. I&#8217;ve added some [...]]]></description>
			<content:encoded><![CDATA[<p>  <a href="http://playmary.com">Playmary</a> is my audio autobiography site.  You create an account and upload songs that you are listening to a lot, or that symbolise what is going on in your life.</p>
<p>Up until now, you would click on songs to play and pause them, and when one song ended, the next would play.</p>
<p>I&#8217;ve added some new code that lets you move through the playlist with the left and right arrows, and pause and play the current song with the space bar:</p>
<p><script src="http://gist.github.com/268961.js?file=gistfile1.js"></script></p>
<p>Code adapted from the source in <a href="http://www.geekpedia.com/tutorial138_Get-key-press-event-using-JavaScript.html">this article</a>.</p>
<p>The only downer is the space bar is a shortcut for scrolling in Safari, Internet Explorer and Firefox.  <a href="http://iamdanw.com">Dan W</a> and I couldn&#8217;t think of any conventions for play controls in the browser.  j/k/l seems too obscure, and I really want the controls to mimic iTunes.  Hmmm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/adding-keyboard-control-to-playmary-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capture The Flag London</title>
		<link>http://www.maryrosecook.com/post/capture-the-flag-london-3</link>
		<comments>http://www.maryrosecook.com/post/capture-the-flag-london-3#comments</comments>
		<pubDate>Sun, 29 Nov 2009 01:22:29 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/capture-the-flag-london-3</guid>
		<description><![CDATA[Really great fun. Forty people, two eighths of a square mile, two flags, two jails. Steal the other team&#8217;s flag and return it to your base. If you are in the other team&#8217;s territory and one of them touches you, you must go to their jail and stay there until a member of your team [...]]]></description>
			<content:encoded><![CDATA[<p>  Really great fun.  Forty people, two eighths of a square mile, two flags, two jails.  Steal the other team&#8217;s flag and return it to your base.  If you are in the other team&#8217;s territory and one of them touches you, you must go to their jail and stay there until a member of your team frees you.  Other than physical violence, pretty much anything goes.  Run, sneak, hide behind cars and in shadows, blend in with the public, climb fences and dive under bushes, set up diversions and coordinated attacks.  <a href="http://capturetheflaglondon.blogspot.com/">Find out more</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/capture-the-flag-london-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capitalism and distance</title>
		<link>http://www.maryrosecook.com/post/capitalism-and-distance-2</link>
		<comments>http://www.maryrosecook.com/post/capitalism-and-distance-2#comments</comments>
		<pubDate>Mon, 09 Nov 2009 01:21:32 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/capitalism-and-distance-2</guid>
		<description><![CDATA[Capitalism is founded on distance. I specialise to become more efficient and, thus, more productive. The more I write code for a living, the better I get and the more quickly I turn time and raw materials into money. Because money is the goal, everything is subordinate to efficiency. Others&#8217; well-being, my enjoyment and my [...]]]></description>
			<content:encoded><![CDATA[<p>  Capitalism is founded on distance.  I specialise to become more efficient and, thus, more productive.  The more I write code for a living, the better I get and the more quickly I turn time and raw materials into money.  Because money is the goal, everything is subordinate to efficiency.  Others&#8217; well-being, my enjoyment and my ethics are secondary concerns.  So, my specialisation both distances me from the world and from what makes me myself.</p>
<p>Then, I use this money to get the other things I need. Money travels well, so I can use it to buy sneakers made by children I will never meet, wood from forests I will never see cut down and aluminium unibody enclosures made in mills I will never hear.  This remoteness means I don&#8217;t sense, and so I am not affected.  I sense neither the suffering in the places from which I import, nor the joy I could get from growing my own horse chestnut tree.</p>
<p>I push away my culpability with representative democracy.  I absolve myself of blame with the distance between my views and those of my representative, the distance between me and their actions.  This distance is essential for the homogenisation of laws essential for the homogenisation of the transfer of money essential for the specialisation of work essential for efficiency essential for productivity essential for distance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/capitalism-and-distance-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Escalation</title>
		<link>http://www.maryrosecook.com/post/escalation-2</link>
		<comments>http://www.maryrosecook.com/post/escalation-2#comments</comments>
		<pubDate>Wed, 04 Nov 2009 01:20:34 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/escalation-2</guid>
		<description><![CDATA[I&#8217;m playing Grand Theft Auto IV: The Ballad Of Gay Tony. I start a mission where I need to sabotage some building works. I get into the car that Tony has lent me, pull away from the kerb and thread my way through the traffic. I drive through the streets as Tony chatters away. Then, [...]]]></description>
			<content:encoded><![CDATA[<p>  I&#8217;m playing Grand Theft Auto IV: The Ballad Of Gay Tony.  I start a mission where I need to sabotage some building works.  I get into the car that Tony has lent me, pull away from the kerb and thread my way through the traffic.  I drive through the streets as Tony chatters away.</p>
<p>Then, some idiot changes lanes into my path and I can&#8217;t avoid driving into him.  I reverse angrily and accidentally hit the car behind.  Irate drivers toot their horns.  I get out of the car, aim my gun at the lane-changer and shoot him through his windscreen.  He gets out and tries to run, so I shoot him a few more times and he falls and dies on the tarmac.</p>
<p>I hear sirens and a police car comes into view.  I open fire on it with my automatic rifle as it comes to a halt.  I get one policeman as he jumps out and the other while as he takes cover behind the bonnet.  Two more police cars arrive, so I throw a grenade at one, get back in my car and fire at them as I drive away.</p>
<p>There are now a police helicopter, a SWAT van and two police cars after me.  I drive at top speed down one of the main roads in Liberty City, running over pedestrians, crashing into lamp-posts and smashing my way through a road-block. At last, after expending six clips, one grenade, some blood and seven lives, I manage to lose the police, so I follow the sat-nav in my clanking, smoking car back to the first building site that needs to be sabotaged and carry on with my mission.</p>
<p>The destruction is fun.  It&#8217;s what Grand Theft Auto is about.  But I like the moments when you&#8217;re in that strange mode where you&#8217;re still playing by the rules of the real world.  When you can choose to ignore the driver who didn&#8217;t check his mirror.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/escalation-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Barcamp London 7</title>
		<link>http://www.maryrosecook.com/post/barcamp-london-7-2</link>
		<comments>http://www.maryrosecook.com/post/barcamp-london-7-2#comments</comments>
		<pubDate>Mon, 26 Oct 2009 01:19:40 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/barcamp-london-7-2</guid>
		<description><![CDATA[I helped organise this Autumn&#8217;s London Barcamp. It was at the IBM building on the Southbank. We provided food, drink, some rooms, a bit of floor to sleep on and a blanket. Then, each of the 200 people who came did a twenty-minute session on something they know about. We had nine sessions running every [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://maryrosecook.com/images/IMG_1610.JPG" width="500" /></p>
<p>I helped organise this Autumn&#8217;s London Barcamp.   It was at the IBM building on the Southbank.  We provided food, drink, some rooms, a bit of floor to sleep on and a blanket. Then, each of the 200 people who came did a twenty-minute session on something they know about. We had nine sessions running every half an hour from 10 a.m. on Saturday to 5pm on Sunday and there were lots of interesting discussions in the corridors.</p>
<p>I saw some ace talks about PubSubHubBub, the boardgame Go, custom fonts on the web, erotic writing, the design of the TV programme LOST, a Nintendo Entertainment System emulator in Javascript, the art of improvisation, live-coding a Scheme interpreter in Ruby, and the dinner game Werewolf.</p>
<p>My session was on <a href="http://awesomebands.playmary.com/">10 Fucking Awesome Bands You Should Be Listening To</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/barcamp-london-7-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anti-capitalism</title>
		<link>http://www.maryrosecook.com/post/anti-capitalism-2</link>
		<comments>http://www.maryrosecook.com/post/anti-capitalism-2#comments</comments>
		<pubDate>Fri, 02 Oct 2009 01:18:46 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/anti-capitalism-2</guid>
		<description><![CDATA[Things should be run differently.]]></description>
			<content:encoded><![CDATA[<p>  Things should be run differently.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/anti-capitalism-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Queer</title>
		<link>http://www.maryrosecook.com/post/queer-2</link>
		<comments>http://www.maryrosecook.com/post/queer-2#comments</comments>
		<pubDate>Fri, 02 Oct 2009 01:17:48 +0000</pubDate>
		<dc:creator>maryrosecook</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.maryrosecook.com/post/queer-2</guid>
		<description><![CDATA[A malleable gender and sexuality. Living in a punk/DIY/anti-captialist environment.]]></description>
			<content:encoded><![CDATA[<p>  A malleable gender and sexuality.  Living in a punk/DIY/anti-captialist environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maryrosecook.com/post/queer-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
