Mary Rose Cook

Syndicate

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 - it was an old game even then. I was in love with it and another game, Myth II, around the same time.

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.

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.

You can create your own scenarios of destruction, and plot the enemy’s demise like a story. Once you get good at a level, the carnage takes on an air of theatre, of ballet.

Each level in Myth II is just about wiping out the enemy’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.

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’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.

 

Writing an mp3 crawler in Clojure

I’ve written an mp3 crawler to help me learn Clojure. It’s 150 lines. I’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

  1. Start with a URL, like saidthegramophone.com
  2. Request the page and find all the URLs on it.
  3. Save all the ones that point at mp3s.
  4. Note down how many mp3s were yielded.
  5. Throw away ones that definitely don’t point at other HTML pages (images, Javascript).
  6. Throw away ones that are at hosts that don’t seem to yield many mp3s.
  7. Add the rest to the list of URLs to crawl.
  8. Go to step 2 with the next item on that list.

Interesting points

Agents

URLs are requested by asynchronous agents in batches of twenty. Thus, they can be crawled much more quickly. crawl-batch-of-urls maps the twenty items in urls-to-crawl to the request-url function. This function creates a new http-agent and tells it to download the (HTML) content at the url. crawl-batch-of-urls then waits up to ten seconds for all the agents in the batch to finish, then passes them back.

Host scores

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 www.saidthegramophone.com/archives/in_this_box_or_another.php was crawled and five mp3s were found, four points would be added to the score for www.saidthegramophone.com

update-host-scores updates a hash of hosts and scores after a new URL is crawled:

gen-host-scores -

  • is called twice at the beginning of the program’s execution:

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.

Being encouraged to think better

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:

The main loop

Scrawl, the function that runs the show. If the list of passed url-crawl-agents is empty, a new batch is created and scrawl is called again. If the next agent on the list failed to complete its data request, it is thrown away and scrawl is called again. Otherwise, the function calculates all the required data and calls itself.

 

Bands are better live

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 “Royal Albert Hall” gig in 1966.

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’s Parties last year and saw that Ian Williams does actually play the keyboard and guitar simultaneously.

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.

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’s Us Ones In Between has the piano marking out the melody and the rhythm. However, this live version has the piano nowhere and the song completely driven by a guitar string being alternately tightened and loosened.

Perhaps most tellingly, if a band has a live album, it is usually my favourite. Here are some examples on a special Playmary I made.

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.

I’m not quite sure where this is leading.

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 ‘net? A lead going from the sound desk into a cassette recorder and, later, a lead from the cassette recorder to a computer would be enough. A quick upload to a website and it would be available to everyone.

 

Custom additions to the Firefox dictionary from the last two weeks

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.

 

Adding keyboard control to Playmary

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’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:

Code adapted from the source in this article.

The only downer is the space bar is a shortcut for scrolling in Safari, Internet Explorer and Firefox. Dan W and I couldn’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.

 

Barcamp London 7

I helped organise this Autumn’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.

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.

My session was on 10 Fucking Awesome Bands You Should Be Listening To.

 

Queer

A malleable gender and sexuality. Living in a punk/DIY/anti-captialist environment.

 

Old projects

These are some things I’m not working on, anymore, but that might still be cool.

 

131

In preparation for December, I made a Spotify playlist for Ten Years of All Tomorrow’s Parties. It contains an album for each of the bands on the line-up. The following bands were not available on Spotify, so you can check them out at their Myspaces.

The For Carnation,
Papa M,
Fuck Buttons,
Sleepy Sun,
Sunn o))),
Alexander Tucker & Decomposed Orchestra,
The Magic Band,
Porn,
Tall Firs,
BEAK>,
Polvo,
youm.