Friday, October 31, 2008

Dance Beats Seem Easy


Relentless, The REV from flight404 on Vimeo.

How it came into being.

COSY: Composition Sequencing Language With Embedded Ruby

This is pre-release software: a compact syntax for sequencing with MIDI support and plans for generative graphics support as well. Supports evaluating arbitrary Ruby code during a sequence. Ruby eval is disabled in the online demo for obvious reasons.

Script Max/MSP With JRuby

Adam Murray's ajm.ruby gives you Ruby scripting of the Java objects in Max's API, embedded in Max.

Thursday, October 30, 2008

SocialBeat: Control OpenGL With Ruby And MIDI

Xavier Shay's SocialBeat app allows you to livecode OpenGL in Ruby, and control that OpenGL with MIDI at the same time. This screencast illustrates some rough, proof-of-concept example material.

This is one of the roughest, messiest screencasts I've ever done. You'll think I was drunk. But it's worth watching anyway. This is a very innovative app. The flattering part: Xavier told me he got the idea from my RubyFringe presentation on Archaeopteryx.

FPS Productions: Gig Wins Best Drama

Last year I played a cop in FPS Productions' short film Incrimination. FPS just won Best Drama at the UCLA Campus Movie Fest 2008 with this short.

Tuesday, October 28, 2008

Archaeopteryx Now Runs On MIDIator

This morning I merged into Archaeopteryx master Ben Bleything's midiator fork, which replaces the MIDI implementation code from Practical Ruby Projects with his library MIDIator. MIDIator's based on the same code Arx was using, because Practical Ruby Projects is the best Ruby book since the original first edition of The Rails Way, but it's cleaner and more actively maintained. Additionally I had skipped the Windows and Linux support part of the Practical Ruby Projects code, but Ben includes it and tests it.

Cannibal Baby: The Love Story

I once worked with a project manager who was so horrible that the only way I could tolerate her presence in the office at all was to work at home in my free time on a horror movie script starring her as the monster. She drank Jack Daniels out of a gigantic bottle with only a sliver of whiskey remaining, carried around a similar bottle of Listerine, and dressed like she was thirty or forty years younger than she was. I was working with her for at least four months before I realized she was supposed to be in charge of me in some sense. I thought she worked for some other department and just came to our meetings because she was interested.

The horror movie I built around her still only has a few scenes written. It needs to be a Pixar-style movie. Later I took a new job. On the way to a company camping retreat, I explained to my new boss that when I finished the horror movie script I was currently working on, the next script I needed to write would be an animated horror movie starring children. If you've heard of Lord Of The Flies or any of the Brothers Grimm fairy tales, you know it's possible to build great horror stories around children. But why an animated movie? Because therapy bills and civil lawsuits limit what you can do with child actors. You couldn't make South Park with real children, and you couldn't make the movie I have in mind about this horrible, warped she-spider of a project manager with real children either.



I didn't explain this all to my boss on the way to the camping retreat. I don't like to describe what I'm writing until it's written, and you can ramble in a blog post more than you can in real life. Instead I picked a much simpler analogy: an imaginary movie called Cannibal Baby. The Cannibal Baby turns all the other babies into cannibals too, as well as the toddlers, kittens, and puppy dogs. A child molestor captures the Cannibal Baby and keeps it on a leash. The Cannibal Baby eats its way out of its mother's body, bursting out of her head covered in blood and brains.

You couldn't do this stuff with child actors. You'd get sued for therapy bills and your child actors would be in therapy for their entire lives. If they got married and had kids those kids would probably need therapy too. Therefore - my logic went - the only way to make horror movies that explore the true potential of horror stories involving children is if they're animated, and computer animation specifically is much more powerful for the kind of texture and realism horror movies require.



But I failed to question my assumptions. There's one flaw in my theory, and if you've travelled the world, you may have already spotted it. The flaw is that A) not every country is as lawsuit-happy as the United States, and B) if your government pays all the therapy bills anyway, you can make any damn movie you want with child actors.

Some demented Swedes took this freedom and ran with it.



The version in theaters has subtitles, but I just wanted to mess with your head. And if you can't deal with subtitles, don't worry. The 2009 Hollywood remake was a done deal before the film even got a US distributor.



This is an amazing movie. A sick, twisted love story, a horror movie with a scary and sympathetic monster, and just the tiniest dash of that evil-children Lord Of The Flies stuff - just enough to make you remember that vampires don't exist, but monsters do.



It's got the most original love story since Harold And Maude, which was a long damn time ago. It's as magical as Pan's Labyrinth, and unlike Pan's Labyrinth, no idiot is going to tell you it isn't a horror movie. The cinematography is icy smooth, the humor is sly and wicked, and the drama is real. The acting is absolutely extraordinary.



If you date enough women, you will fall in love with a monster. At least one. It's inevitable. She's sleek and smart and then you spot those teeth on her, those rows and rows of razor-sharp needle teeth. You see the blood on her hands and you wonder how many bodies you haven't seen that you'll never find out about. And her eyes are so beautiful. There's a unique blend of horror and nostalgia when you think of her, and Let The Right One In captures every last nuance of its flavor.

Monday, October 27, 2008

Sunday, October 26, 2008

Laptops And The Law: Presumption Of Innocence

Presumption of innocence is a core principle of American law. Laws about computers are violating this principle.

BoingBoing (1)

A 40-year-old substitute teacher faces up to 40 years in prison after being convicted of exposing children to pornography on a computer at the Connecticut middle school where she taught.

I suppose it's remotely possible the charges are valid. But the story doesn't add up. It seems far more plausible from the accounts I'm reading that this woman, who had no prior criminal record and a clean teaching history, was using an insecure edition of Internet Explorer and was hit with an adware infestation she didn't know how to deal with.


BoingBoing (2)

The Connecticut substitute school teacher who exposed 11 and 12-year-old students to porn in the classroom -- unintentionally, she says, because of malware on an infected PC -- may now go to jail. If her claims are true, she'll be the first American ever jailed for having had the misfortune of being forced to use a buggy school computer, with incompetent or nonexistent tech support from that school's administration despite repeated requests for help.

Huffington Post

Imagine you're on your way home from a family vacation or business trip and some border agent or Transportation Security Administration (TSA) screener stops you or a family member at airport security and insists that you turn on your laptop. They then demand your password so they can browse around and they follow that by confiscating your computer until a later date -- with no charges filed and no reasonable suspicion.

Like air travel isn't dehumanizing enough, right? And would most of us have any idea how to even respond to such a sudden and arbitrary invasion of our privacy?

That scenario has actually been happening right here in the United States of America and it's the reason Senator Russ Feingold (D-WI) has authored S. 3612, the Travelers' Privacy Protection Act of 2008, which would ensure that American citizens and legal residents returning to the U.S. from overseas are not subject to invasive searches of their laptops or other electronic devices without any suspicion of wrongdoing.

"Most Americans would be shocked to learn that upon their return to the U.S. from traveling abroad, the government could demand the password to their laptop, hold it for as long as it wants, pore over their documents, emails, and photographs, and examine which websites they visited - all without any suggestion of wrong-doing," Feingold said. "Focusing our limited law enforcement resources on law-abiding Americans who present no basis for suspicion does not make us any safer and is a gross violation of privacy. This bill will bring the government's practices at the border back in line with the reasonable expectations of law-abiding Americans."


Wired

Secretary Chertoff's description of the newly published DHS policy on laptop searches was not just misleading – it was flat-out wrong. In an interview with Wired.com, the Secretary stated that "[w]e only do [laptop searches] when we put you into secondary [screening] and we only put you into secondary [screening] ... when there is a reason to suspect something."

But the actual policy that DHS published says the exact opposite. It does not even mention secondary screening, let alone limit laptop searches to those cases, and it expressly states that Americans' laptops may be searched "absent individualized suspicion."

Secretary Chertoff's blatant mischaracterization of the DHS policy contradicts his claim to be engaging in greater "openness and transparency" on this important issue. His statements make it clearer than ever that as we work to protect our national security, Congress must also act to protect law-abiding Americans against highly intrusive searches.


To give another example, I believe (but haven't been able to verify) that the presence of child porn on a computer is enough to secure a conviction. To naive users this seems very reasonable. However, both through adware and hacking, it's possible to put images on another person's machine without their consent or knowledge. The scenario's far-fetched in the case of child porn, but the case of the Connecticut substitute teacher - who may have received jail time because her school board failed to protect themselves against adware - illustrates the importance of putting the burden of proof where it belongs and having laws which avoid naive and inaccurate assumptions about how computers work.

Obama's political apparatus solved the question of how to employ Web 2.0 technologies for political purposes. The inverse question - how to keep lawmakers adequately informed of technological developments - is still open.

Elysium: OS X Music App

I put a lot of energy into my conference presentations earlier this year.

There's a reason:



This is just about the most flattering news ever. Here's Elysium, nutrimatt's app, in action.


Ad hoc composition with Abaska Bong and Abendstern from Matt Mower on Vimeo.


Ebbing and flowing from Matt Mower on Vimeo.

The Republican Party Is Toast

The Republicans are angry.



But for once, when they're yelling "Kill him!", they're not talking about Obama. They're talking about each other.



Rush Limbaugh:

The latest moderate Republican to abandon his party is William Weld, the former governor of Massachusetts who today endorsed the Most Merciful Lord Barack Obama. He joins moderate Republican Colin Powell. He joins former Bush press spokesman Scott McClellan...I, for one, say, "Damn well good riddance!" Weld, why don't you stay a Democrat? McClellan, stay a Democrat. All you intellectual conservative media types, go ahead and stay a Democrat once you move over.



Telegraph.co.uk:

Republican fears of historic Obama landslide unleash civil war for the future of the party

Senior Republicans believe that John McCain is doomed to a landslide defeat which will hand Barack Obama more political power than any president in a generation.

...

Ed Rollins, who masterminded Ronald Reagan's second victory in 1984, said the election is already over and predicted: "This is going to turn into a landslide."



The real bile has been saved for those conservatives who have balked at the selection of Sarah Palin.

In addition to Mr Frum, who thinks her not ready to be president, Peggy Noonan, Ronald Reagan's greatest speechwriter and a columnist with the Wall Street Journal, condemned Mr McCain's running mate as a "symptom and expression of a new vulgarisation of American politics." Conservative columnist David Brooks called her a "fatal cancer to the Republican Party".

The backlash that ensued last week revealed the fault lines of the coming civil war.




Jim Nuzzo, a White House aide to the first President Bush, dismissed Mrs Palin's critics as "cocktail party conservatives" who "give aid and comfort to the enemy".

He told The Sunday Telegraph: "There's going to be a bloodbath. A lot of people are going to be excommunicated. David Brooks and David Frum and Peggy Noonan are dead people in the Republican Party. The litmus test will be: where did you stand on Palin?"




"Win or lose, there is a ready made conservative candidate waiting in the wings. Sarah Palin is not the new Iain Duncan Smith, she is the new Ronald Reagan." On the accuracy of that judgment, perhaps, rests the future of the Republican Party.



Washington Post

There are many ways to lose a presidential election. John McCain is losing in a way that threatens to take the entire Republican Party down with him...You have to go back to the Watergate era to see numbers quite so horrible for the GOP.



Thomas Frank predicted it in What's The Matter With Kansas? - he illustrated exactly these fault lines and said coalitions don't gradually fall apart, they collapse dramatically.



Sayonara, motherfuckers.

Saturday, October 25, 2008

Dubsteppy, Techno-Influenced Breaks Track

I wrote this track in 2003 or something:

http://www.gilesgoatboy.org/audio/on_fire.mp3

Weirdly, though, it fits the current musical landscape much better than it fit the landscape then. Some of the people who follow me on Twitter are into dubstep, so I figured I'd post this.

Web 2.0 Politics: Obama Radar

Innovative, effective, and polished. An interactive Flash map combines with Lightbox divs and Flash audio players so you can hear the robocalls yourself.

The Crucible: Why It Matters

I want to do a theatrical production of The Crucible by Arthur Miller. The Crucible is about the Puritan witch-hunts in Massachusetts and uses them as an analogy for McCarthyism in the United States.

A lot of people know that the Puritans were sexually repressed religious fundamentalists. What a lot of people don't know is the context of their sexually repressed religious fundamentalism. As an example, in the 1600s the Puritans took control of England and banned all public performances of any kind. What do you think happened next? You might think the theater eventually, gradually recovered. No. What happened next were the first celebrity actors, the first female professional actors, and an explosion of the most sexually explicit comedies that had yet been seen on stage.

This theatrical microcosm illustrates a fundamental dynamic. In January 2009, we will finally see the departure from office of the President who's done the worst damage in history to our Constitution and our government. It's possible that we're about to follow him up with the first black President, and the first Web 2.0 President, and the first President to take no campaign donations from lobbyists. This is an extraordinary contrast. I know I'm going off-message here, but it's not really an only-in-America story. This is exactly what happened in the English theater in the 1600s.

The Crucible is a really interesting way to explore this. With George Bush and his warrantless wiretapping, the play would have been a very obvious choice in 2005 and 2006. I think it remains relevant, though, because there's an overall trend to greater surveillance in our society which began about twenty years ago in England with anti-terrorist cameras everywhere and has spread to many many countries. It's not going away with the election, no matter who wins.

The surface story of The Crucible is the terror of witch-hunts, and the girl Abigail, who fakes the witch-hunts as a way to chase this guy who she can't have, and have his wife killed so they can be together. There are a lot of ways to play her - I want her to be kind of monstrous and innocent at the same time, like the tip of a scary iceberg.

The icebeg is that the witch-hunts took place at a time of economic transition, and represented a sort of dying gasp of the old economic powers. What's implied at the end of the play is that the witch-hunts were not a creeping doom but a temperamental whirlwind. The picture you get of history is that these people were really superstitious, and sometimes they even had witch-hunts. I can't track down where I got this idea, but I think the reality of both history and the play is that the witch-hunts came right before major social upheaval followed by major improvements. The implication is that when society's about to change dramatically, conservatives turn a little psychotic - and indeed, the 1960s came very soon after the McCarthy era.

Turning back to surveillance, the future probably isn't government-powered surveillance but a whole range of interconnecting systems of self-surveillance - cyberpunk theorists call it sousveillance - for example, instead of security cameras everywhere, people use cameraphones and send their pics of crimes or dangerous situations directly to the police, or, in some circumstances, directly to each other. Parts of these phenomena are starting to happen, parts are still science fiction. But that kind of system implies a breakdown in the old order, because these technologies are decentralizers - they put power in the hands of individuals.

Having cameras monitor the world for crime makes a lot of sense; it's restricting access to those cameras, so that only the government can use them, which becomes crazy under these new conditions. That imposes an unnecessary bottleneck on information which can save lives, but only if it disseminates rapidly. But if the police and the government change from the major source of protection from crime to the major bottleneck in reporting it, that's a big difference. The safest way to deal with that kind of information is to make it widely available, but that requires a serious change in the power relationship between the police and the people. Decentralizing technologies cause economic transitions - cameras become cheap and ubiquitous - which then make social transitions necessary as well.

The witch-hunts of The Crucible were the last dying gasps of an old social order, going tyrannical to keep itself from falling apart. I think that's what's going on with these "police state" phenomena today.

One way I want to communicate this is with costume and set design - security cameras on streetlights in the background, futuristic SWAT-team thugs, etc. There's an African slave in the script, she has the kind of dialogue that made sense for an African slave in a play written during the 50s. Instead of changing her dialogue, I want to make her a hippie. Keep the tribal part, dump the African specifics as they just don't fit the world any more, but the idea of there's this order and there's this wild being who doesn't fit the order, and never can, who the order keeps as a slave, that's an important part of the picture, and I think making that character a hippie would be pretty interesting.

I also think there's a kind of simmering anger against the government going on right now. At the gym a lot of the music videos they play have kids rioting and setting things on fire. I want to kind of up the stakes of the scenario - like the scene where they arrest Giles Corey, it's pretty orderly in the script, but it could be a knock-down drag-out fight in this production. There could be tasers, nerve gas, cameraphones, all kinds of modern contrivances which just change or amplify the tone without rewriting a word of the original play.

I haven't figured out how to do this, though. It takes a lot of work to put on a play and it's not necessarily for novices.

Friday, October 24, 2008

Remixes: Open Source Music Marketing

GitHub turned to open source so the community could help them improve their gem builds.

The amount of people running into issues with our gem builder has been overwhelming, so we’re releasing the code if some kind souls want to lend a hand making the system more secure and robust.

What's the best way to fix something your users know how to edit it? Let them edit it.

What's the best way to market the Eurythmics to teenagers? Let a drum and bass DJ do it.



What's the best way to market Jim Jones to the reggaeton market? Let a reggaeton DJ do it.



For that matter, what's the best way to market Evanescence to the reggaeton market?



Or the best way to market gangsta rap to Muppet fans?

How I Indent My Code









You get spaces for free. You might as well use them.

The style's unusual, as far as I can tell. Coming from some backgrounds, it may look very strange. Depending on your expectations, the last example is either completely insane or nicely separated into semantic components.

I get the style from Lisp. Note the long series of right-side parentheses, square brackets, and curly braces at the end of the last line of the last example, and the frequent clusters of right-side square brackets in the second example. Working with lists of lists requires this style if you want your code to be readable at all, and a lot of Rails and Ruby stuff has you building lists of lists, especially with keyword hashes.

The last example's an extreme example and valuable for that reason. This example makes it very clear what benefit the style gives you. The square in the upper left is a list of keyword arguments; the square in the lower right is a list of objects and their initialization keyword arguments. In either case, you're dealing with a long list of things, separated out into categories. All the keyword arguments are in the same square; all the new objects are in the same square. If there were more than one Mix object in that construct, they would both indent to the same margin, and there would be two of those right-hand side new object blocks.

Verbatim: How To Find Patterns In Code With Towelie



Dude, 140 characters? You're insane. It's not possible. Besides, I have Twitter on a temporary hosts-file ban.

First off, your lowest-hanging fruit is Jakob Dunphy's Crufty:

http://github.com/jdunphy/crufty/tree/master

Second off, if you're feeling brave, check out Towelie's MVC branch:

http://github.com/gilesbowkett/towelie/tree/mvc

It's kind of on hold right now, I've been doing a bunch of Archaeopteryx stuff for RubyConf, but you should be able to do something like this:

<macbook of doom:giles> [10-23 13:27] ~/programming/web_apps/your_app
! irb -r ../towelie/lib/towelie.rb
>> @t = Towelie.new
>> @t.parse "app/models"
>> puts @t.duplicates


That'll get you a list of all exact duplicates.



(The only reason @t's an ivar is I have a lot of one-character aliases in my IRB, so I always make one-character demo vars in IRB into ivars to be safe.)

Parsing for patterns is harder because that's a relatively abstract request. Towelie has some diff functionality which allows you to specify the number of nodes by which a method definition differs. You can use that to find patterns in method definitions, but only in method definitions, and it could be a little involved.

The MVC branch is UI improvements but added complexity. Really the diff stuff should live in its own branch. I fucked that up. So you have to do this:

>> @m = Model.new
>> @v = View.new
>> @m.parse "app/models"
>> @m.diff(1).each {|different| puts @v.to_ruby(different)}


Unfortunately you'll notice that the duplicates stuff gives you filenames as well as the methods themselves, while the diff output is less readable. No filenames and things aren't correlated to indicate what they're different from. That's because I set up a cool ERB template for duplicates but diff isn't ready on that yet. Actually now that I think about it, it might have a regular diff in master. And I might have an incomplete thing set up to collect that filename info, too. I don't remember now.

In theory, btw, it should be possible to enable some pretty cool ASCII colors BS via ERB, but my ultra-naive first attempt went kaboom and I've not had the time to take Wirble apart and remind myself how ASCII colors work. In fact technically I'm pretty sure that Wirble's ASCII strategy, plus Jamis Buck's Syntax gem, mean that one day I may actually have ASCII syntax coloring built into Towelie. Still way off in the happy land of vaporware, though.

Anyhoo, obviously, you can scale diff(1) up to diff(x), although it might set your machine on fire, and I think the specs only test it as far as diff(2) or something.

If you're going to fuck around with the diff, it's actually quite powerful, but that power is damn near impossible to see. I would very strongly advocate messing with the code a little bit, taking some time to hack up a decent UI in ERB, just sorting the elements in diff(x) into groups so you can see what you're diffing. It's absolutely possible to isolate the different elements in a diff, i.e., "xyz" differs from "xy" by "z," but it's not in there yet.

Thursday, October 23, 2008

Frog Lady Speaks

Tuesday, October 21, 2008

I Did Not Know That

What Is The Opposite Of The GOP's Base?

Everybody in America, liberal and conservative alike, owes it to themselves to read Thomas Frank's books What's The Matter With Kansas? and The Wrecking Crew. Both books explain the transformation of the GOP in recent years. Essentially, the GOP left some of its core principles of fiscal conservatism behind several Presidents ago. Its new system energizes a fervent base of religious social conservatives in the service of aggressive imperialism which often backfires (Iraq, Vietnam) and economic policies which benefit only the very wealthy. The McCain/Palin ticket demonstrates the failings of this philosophy - two candidates who are both kind of crazy in their own unique way and don't really seem to have much in common with each other.

You hear a lot on the news about the GOP's base. Consider demented comments like "I heard he was an Arab." As if Obama were a Muslim. As if that should matter, in a country which has stood for religious freedom since the first Puritans landed in the 1600s. As if all Arabs were Muslim, and there were no Christian Arabs, like the ones in Lebanon. As if anybody in their right mind would try to run an Arab for President in the United States in the first place. As if the Democrats decided that getting a black man elected President only 150 years after slavery ended wasn't challenging enough, and for some insane reason decided they would run an Arab instead.

This madness happens because the center cannot hold. The Republican party is a political coalition uniting two very different extremes, and that unity may not last. Moderates matter in American elections, moderates meet where two extremes agree, and the two extremes of the Republican party don't agree on as much as they really need to agree on in order to hold their party together. The McCain Republicans and the Palin Republicans have so little in common with each other that the Palin end of the spectrum even has an ethnic slur for the McCain end. When a huge group of poor people give a lot of time, energy, and political power to a small group of rich people who are telling them what they want to hear, it's a reasonably safe bet that the rich people are employing an elitist strategy. But you'll never hear McCain Republicans called elitist, no matter how many homes they own, no matter how obvious their contempt for the uneducated. "Elitist" means "rich person who doesn't hate gays or foreigners" in the Republican lexicon. The Republicans without money call the Republicans with money RINOs - Republicans In Name Only.

The people who use the term RINOs don't have any word for themselves but "Republicans." Meanwhile, in the mainstream media, you won't hear the term RINO. There the term "Republicans" means "RINOs plus the other guys." The mainstream media does have a word for the other guys - they call them the base. "Palin energizes the base." "These policies appeal to the base." "The base is pulling hard for Mike Huckabee." Etc., etc., etc.

The mainstream media and the GOP base hold very different opinions about the world. The mainstream represents a centrist point of view, by definition, while the GOP base represents a particular extreme. Both the mainstream media and the GOP base agree that the parts of the Republican party are different enough that one part deserves its own name. They just disagree on which part that is. The base says that the RINOs are the exception from the rule, different enough to deserve their own name. The mainstream media says that the base are the exception from the rule, different enough to deserve their own name.

The schism Frank identified in the Republican party several years ago is growing. It's big enough now that everybody has a word for it, although we've yet to agree as a country what that word is. The major advantage of using the mainstream media's terminology is it isn't hostile or judgemental. Republican In Name Only essentially means "traitor" or "poseur." It doesn't tell us anything about how RINOs differ from the base. It just tells us that the base doesn't like them. It's also obviously false. If you're giving money to the Republican party and voting with them, you're not just a Republican in name, but also in votes and in cash.

We have to throw out the term that the GOP base uses. But it's probably time to put a name on both sides of the divide. If they've already started calling each other names, it might only be a matter of time before they start fighting. And that's where the question comes in. What is the opposite of a base? Is it the GOP antenna? The GOP cap? The GOP apex? It could be that the only way to clearly articulate this schism is to throw out the term "base" as well and replace it with something a little more specific.

I think of the two sides as the suckers and the con men, but I'm biased.

CSS Image Matrix In Ruby

1) CSS Image Matrix

2) In Ruby

Monday, October 20, 2008

DJ WiiJ



djwiij.com

Coming Soon: Propane

Most of us don't use Campfire at ENTP. We use a Campfire chat room, but we view it with Propane.



Here's Trevor Squires talking about why he wrote Propane:

Campfire is about immediacy. When you want to share a file, you just upload it. Seen a cool image? Copy in the url and Campfire shows it inline.

With Propane I'm trying to take immediacy and turn it up to eleven. In a desktop app I can do stuff that a web app can't do.



When you drag an image from Safari and drop it into Propane, what are you trying to communicate? Sure, Campfire displays the image, but where did it come from? How many times have you been asked "where's that from?". Propane does that for you.



Same thing with text from a web page.

When you copy in a tweet url, why are you doing that? If you want to share the tweet, the actual message is what you meant to share - not some opaque URL. Propane turns it into a twicture because that's what's recognized as a great way to share tweet messages.



How many clicks does it take to upload a file? 3? This is supposed to be immediacy. Just drop the file on Propane.

And one application's 'immediacy' should not get in the way of the same quality of other applications. That's why Propane strips out stuff from Campfire that a native client doesn't need. Navigation bar? Don't need it when you've got control of the app's menu.

When you copy text out of the transcript, did you really mean you wanted all that markup and crazy-ass "lets turn table contents into something legible"? Or did you mean to copy:

trevor: this is cool
giles: indeed it is
matt: I like turtles


Campfire is great. Propane just improves it. The "why" - immediacy - is the killer feature for me.

The fact that 'space' or any punctuation mark commits your tab completion is important to me. I thought long and hard about "what does a user intend" and tried to make Propane behave in a way that doesn't disrupt their intentions.

It's the only reason I wrote this.

Catwoman Sketch

PDX Ruby MIDI Projects

Ruby/UDP MIDI Clock

MIDIator

music.rb

Sunday, October 19, 2008

Archaeopteryx: Activating/Deactivating Live Clips

I made a bold claim about my part of the Ruby music talk at RubyConf.

We'll also demo Archaeopteryx playing drums, switching tempos, and, without any human intervention, creating a live drum and bass remix.

Technically I can get away with that boast just by demoing Arx improvising original drum patterns on top of an 80s song.



But I wanted to do something more interesting than that. One necessary milestone: activating and deactivating clips in Ableton Live while controlling the tempo by sending MIDI to Live's tap tempo control. This was pretty easy to do.



The branch on GitHub.

Tangent: I'm using branches for everything with Arx because the code's a mess and I want it to get even messier. You've got to do some nasty hacking before you make stuff pretty - most of the real ugliness in Archaeopteryx comes from attempts to design the solution before I had built any hacks.

Anyway - the way this code works is it creates a Message class, similar to a MIDI Note, and then sets up several Clip objects, representing Clips in Ableton Live. In practice these are just wrapper classes on Messages. I also created a similar TapTempo class which is essentially a hard-coded MIDI message.

You have to manually set the correlation between MIDI messages and elements of the Live UI. That's a topic for a Live tutorial, but Archaeopteryx includes a script called pulse.rb to handle that. I finally gave it command-line args as part of this branch.

The looping code in Archaeopteryx expects generators to exist, which it can call play on. I expanded this for MIDI messages with send.



I already had a Mix class in Arx for situations where you want more than one generator, so I gave it a send method and then subclassed it as ExclusiveMix for situations where you have a collection of Clips and you only want to play one at a time. (In Ableton, Clips in Tracks can only play one at a time.)

To use this stuff, I wrote a script called fruit_machine.rb (named after "Fruit Machine" by the Ting Tings, which is one of the songs I'm mashing together here).



Here's how it works. First you create a new Clip representing the Clip (A) you want to control in Ableton Live. Next (B) create an ExclusiveMix of all the Clips which run in the same Track. (In fact, ExclusiveMix should be called Track.) Then create a new loop (C), which I call an Arkx for very foolish legacy reasons, and last (D) create a Mix containing your ExclusiveMix objects.

This API will probably change in future, since it sucks.

Gary V On Web 2.0 Personal Marketing



via peter cooper

Saturday, October 18, 2008

I Have Too Many Books

Building Robot Cockblockers For Jesus

I get the weirdest e-mail. This company in Idaho contacted me about building a social networking app for users of their product. Their users are mostly fundamentalist Christian couples, with husbands who travel a lot - truckers, businessmen, soldiers, missionaries, etc. The product is a chastity belt with an RFID reader. The husband gets an RFID chip surgically implanted at the tip of his penis, and the wife wears the chastity belt. They said it's an incredible improvement on the chastity belts of the Middle Ages, which were bulky and had no solution to enable the wife to urinate. I didn't want to hear about their improved, lightweight, no-profile technology and their urination solution, but they tried really hard to tell me. They seemed really proud of it.

They're not worried about the recession at all. They're expecting huge growth the minute they get licensed to export their product to Dubai.

Friday, October 17, 2008

Archaeopteryx: What Is The Matrix?

Unless you're creating a large number of unique drum patterns based on the same fundamental rhythmic template, you probably don't need to know anything about the probability matrices in Archaeopteryx. If you want to convert an RSS feed into a sequence of notes, for example, you can do that without a probability matrix.

The probability matrices in Archaeopteryx represent an evolution in step sequencers. Here's a demo video explaining how to use a popular prosumer step sequencer:



People have been using step sequencers since at least 1980.



The normal step sequencer allows you to specify a matrix of drum instructions. These instructions are boolean: do play the kick drum on the first beat; don't play the snare drum on the third beat. A 3x3 matrix of boolean values looks like this:



You can use the step sequencer in Archaeopteryx in many different ways. I'm hoping to demonstrate it running hardware at RubyConf, but I have to find the hardware first (I left it in New Mexico). I almost always use Arx with the Redrum drum machine in Propellerhead Reason. This drum machine has 10 drums and its standard step sequence length is 16 steps.



This means the Redrum gives you a 10x16 matrix. The db_drum_definition.rb file in Archaeopteryx also provides a 10x16 matrix. However, where you can only enter boolean values in Redrum's matrix, Archaeopteryx allows you to specify floats. That means in addition to saying do play the drum or don't play the drum - which would be expressed with values of 1.0 or 0.0, respectively - you can also say maybe play the drum, and specify precise values for maybe. So instead of a black and white grid, you have a grid with shades of grey.



It's very easy to create drum rhythms with a typical step sequencer, but your tools for creating variations on those rhythms tend to be somewhat limited. Once you define a fundamental rhythmic template for Archaeopteryx as a probability matrix, it becomes effortless to generate either a finite or an infinite number of variations on that template. This is because you can leverage the matrix two ways.

Archaeopteryx's AI step sequencer filters the output of a number generator through its probability matrix to determine whether or not to play a given drum on a given beat. If you provide the step sequencer with a number generator like this:

L{0.9}

It will generate the same beat every time, since its filtering process will every time evaluate the same number against the same value for maybe.

If you provide the step sequencer with a number generator like this:

L{rand}

It will generate a different beat every time, because its filtering process will every time evaluate a different number against the same value for maybe.

That's what's going on here:

Archaeopteryx: Turn Text Into Melodies

This appears to be something people want to do with Archaeopteryx. I don't know why people want to do this, but I figured I'd show them how.



The code's on GitHub - the branch and the script.

Archaeopteryx: Multiple Time Signatures (Serial & Parallel)

I added an experimental/demonstration branch to Archaeopteryx on GitHub.



Check the diff to see how it's done. Basically, I hacked in a new global, and then wrote code in the db_drum_definition.rb file - which is re-evaluated every four measures or so - to reset that global. By resetting $beats from 16 to 9, I'm saying where before we had sixteen beats per measure, we now have nine. In practice this shifts the time signature from 4/4 to 3/3, although to be precise in music theory terms you'd say we're shifting from 16/16 to 9/9. Which is why nobody is ever precise in music theory terms about anything.

Likewise, I created a 9-column probability matrix to use in place of the normal 16-column matrix you use when you're cycling over 16 beats. For historical interest, this trick comes out of step sequencers and analog drum machines. The trick's at least as old as Chicago house and probably older still.



At the risk of sounding like an utter douche, this validates a point Chad Fowler makes in his excellent book My Job Went To India, which is that learning an unusual domain is valuable for the same reason that learning an unusual language is. I have to admit, I'm feeling guilty, because I might be bursting a bubble here. The person who posts cool links on Twitter isn't actually the first person to ask me if this is possible. It's just the first time I've bothered to demonstrate how. This "challenge" is beyond trivial.

Changing time signatures in Archaeopteryx probably seems like a big deal if you're a Rubyist who's never worked with step sequencers to make dance music. Time signatures are a fundamental of music; changing them seems like a serious mind-bender. However, what's fundamental to the territory is not necessarily fundamental to the map as well. If you have worked with step sequencers before, and if you grok that Archaeopteryx is essentially just a probabilistic step sequencer, then the ability to shift time signatures at will goes without saying. It's actually why I used step sequencers as my model in the first place.


Notice how it doesn't say 16. It says 12 and then 4.

If you actually play the music this code produces, you'll notice that it sounds like ass. This is because I just wanted to whip up a quick proof of concept. To exploit this trick, what you want to do is switch not from 16 to 9, but from 16 to 24 - which is essentially 16/16, but in triplets. And you don't want to switch in sequence - you want to switch in parallel. Many dance music producers don't know this trick, but the ones who do use time signature changes with step sequencers "in the wild" not to alternate between two time signatures, one after the other, but to play rhythms in both simultaneously. For example, put the main drums in 4/4 and the high-hats in 6/8. This allows you to introduce variation into otherwise predictable rhythms.

Building that into Archaeopteryx took more work. Here's another experimental/demo branch which can play multiple time signatures simultaneously. And here's the biggest change:



This code will only work with Arrays of generators. Previously Archaeopteryx assumed only one generator - a generator is anything which generates notes for Archaeopteryx to play - and even implemented its Mix class, representing multiple Rhythms, by squashing the notes so that the set of generators acted as one big generator. What this code does is store the start time, and then loop over each generator, calculating the beats and ticking forward the clock for that generator. Later it resynchronizes the clocks. This allows different generators to tick their own individual clocks forward at different increments - which is necessary, since a 16-note step sequencer at 170bpm is going to fit 16 notes into the same amount of time that a 24-note step sequencer at 170bpm is going to fit 24 notes.

That might make you do a double-take. If one note represents one beat, how can different numbers of notes at 170bpm possibly fit in the same amount of time? It may also make you do a double-take if you have done this with a real step sequencer and you remember that you had to adjust the tempos to pull it off. The answer is that notes don't correspond to beats any more. Just like in the representation of time signatures themselves, a note represents a note and a beat represents a beat. This means we're not working in 16/16 and 24/24 any more. We're in 4/4 and 6/8, with 16th-note resolution.

That's why the code above used to use (0..(@beats - 1)) and now uses (0..(rhythm.beats - 1)). The number of beats became Rhythm-specific. This took some other code changes as well.

The code which launches all of this passes two arguments to the Clock, where normally Arx only passes one. The second arg: beats per measure. Likewise it defaults to 16 beats total, as normal, but also allows you to specify a different number.



That's because this Clock can have any number of beats_in_a_measure you prefer:



You might need to read this post more than once to figure out what the code is doing. It baffles me, and I wrote it. The simple branch which alternated time signatures took me about fifteen minutes. The branch which plays two time signatures simultaneously took at least an hour and a half. Could be three or four hours. Hard to tell because I also spent a lot of that time googling for pictures of the sexy bondage Batgirl.



However, what it comes down to is Archaeopteryx can now play multiple rhythms in multiple time signatures at the same time, or one after the other. If you were feeling plain old stupid crazy, you could even have it do both.

Thursday, October 16, 2008

Psychedelic Disco Pornography (NSFW, Duh)

The other day I found some old DVDs I made around 2005ish. I'm not so sure about them any more, but hey, what the hell.

Acid Porn 1 (18 minutes/227 MB mp4)

Acid Porn 2 (7 minutes/85 MB mp4)

Honestly, if you enjoy these, you don't need to tell me, unless you're female. But the "acid porn" title is a little misleading. I got bored of porn after a while and threw in video of a spider during a song named "Tarantula." Obviously the spider imagery isn't erotic. These are really more art/film exercises than anything else. I did them while taking classes in motion graphics and color theory. I did the DJ mix in the first one, the second came from a local DJ in New Mexico (sorry, forgot who, it was a good mix though).

The real reason these videos use porn is because I made them in the pre-YouTube area, where online video was difficult to come by, but one particular genre of video was incredibly easy to find online.

Wednesday, October 15, 2008

Save The Cheerleader, Save The World

Palin: Alaskan Independence Party Lunacy

The party officially renounces violence and disloyalty to the United States, even though its members often do not. The AIP has long been aligned closely with paramilitary militia groups -- the kind that fear black helicopters and a United Nations takeover of the US. Indeed, under the leadership of AIP's tough-talking founder, Joe Vogler, AIP allied itself with the Islamic dictatorship in Iran in 1993 so that Vogler could appear at the United Nations to appeal for Alaska's freedom from US "tyranny." A fellow AIP member murdered Vogler before he could take the UN stage. The current AIP chairwoman, Lynnette Clark, believes that Vogler's killer was framed and all but blames the Federal government for Vogler's "execution."

Frank Naif: Todd Palin's Past Political Associations A Likely Security Clearance Disqualifier

Archaeopteryx: Frequently Asked Questions

Q: Will you help me?

A: Yes.



A: No.

Tuesday, October 14, 2008

RJDJ



Monday, October 13, 2008

Coming Soon: Pimp My Campfire





Tab-completion, custom styles, click-and-drag coolness, unobtrusive background alerts, and more.

Sunday, October 12, 2008

Launch BoingBoing With Ruby & A WiiMote

Setting up Ruby access to MIDI In opened up a lingua franca of entertainment hardware. As an example, I wrote a simple script to open a new browser window on BoingBoing by hitting the center button on a Nintendo WiiMote.

Here's a video. Fair warning, I made it late last night and there's some rambling, some cursing, some poor lighting, and some background noise (specifically Otis Redding, Wilson Pickett, and a feng shui water fountain).



To use this code, you'll need to install and set up WiiToMidi. OS X only, sorry.

Of course the real purpose here is not, hey, look, you can launch BoingBoing with a WiiMote. The real point is hey, look, you can link any arbitrary Ruby code to any arbitrary MIDI hardware, and the list of available MIDI hardware is pretty vast.

Check it out:



This is some simple code. You can process input very, very easily. The range of hardware and software that supports MIDI is remarkable; this is more than just Archaeopteryx.

Archaeopteryx: MIDI In

My biggest thrill at RailsConf had nothing to do with Rails or the conference.



If you're wondering who Richie Hawtin is:



But my big takeaway from the conversation was that Archaeopteryx wasn't actually useful for Hawtin yet. It needed MIDI In. Since I stole all my MIDI Out code from his awesome book Practical Ruby Projects, I e-mailed Topher Cyll, who told me CoreMIDI on OS X handles MIDI In differently from MIDI Out. I would need a callback function in Objective-C, which meant handling it entirely in Ruby via Ruby DL - the same way Archaeopteryx handles MIDI Out - would be impossible. I don't know C or Objective-C. I was screwed.



Things got delayed. Fast forward a few months. Thanks to the work of Markus Prinz and Xavier Shay, a library called rbcoremidi now provides Ruby access to MIDI In (OS X only for now, sorry). Xavier is also working on an implementation of the HTTP drum/visualization idea I explained in my talks on Archaeopteryx.

I haven't had time to integrate this code directly with Archaeopteryx yet, but this makes it possible to transform Archaeopteryx from output-only to input-output. MIDI is to music gear what HTTP is to the Web.

You need to build a bundle file manually in XCode for it to work. I've made a very unpolished screencast. Fair warning, I was pretty tired when I made this, and maybe a little incoherent. I also had to upload it to S3, because of some truly bizarre file import issues on Vimeo.

Screencast (72MB)

Saturday, October 11, 2008

Web 2.0 vs. Corruption

The McCain/Palin ticket is the first in American history in which both candidates were found to have violated ethics standards before a national election.

This is the real reason America needs Obama.

Obama takes no donations from lobbyists or PACs, and he's gotten the Democratic Party to follow his lead.

On Good Morning America Thursday, ABC News' Chief Washington Correspondent George Stephanopoulos reported "the Democratic National Committee will no longer accept contributions from federal lobbyists, will no longer take contributions from PACs" in keeping with Obama's well-publicized policy.

"The DNC and the Obama Campaign are unified and working together to elect Barack Obama as the next president of the United States. Our presumptive nominee has pledged not to take donations from Washington lobbyists and from today going forward the DNC makes that pledge as well," said Democratic National Committee Chairman Howard Dean.


Lawrence Lessig's Change Congress project highlights this as the first and most important change that needs to occur in American politics to end the Washington culture of corruption.

(Meanwhile, during the time McCain was chairman of the Senate Commerce committee, that committee set a record for unauthorized appropriations.)

Obama's campaign contributions come from voters, many of them first-time political contributors via his Web site. This, plus the sophistication of his online social networking software and its crucial role in his campaign, has prompted people to call him the first Web 2.0 candidate. If you've read Here Comes Everybody, it makes perfect sense that a Web 2.0 candidate can bypass lobbyists and go directly to the voters. However, Obama is not the first Web 2.0 candidate.

You might imagine Ron Paul as the first Web 2.0 candidate, given the fanatacism of his online supporters and the way they organize online. Ron Paul has to be the only Presidential candidate who built a campaign almost entirely out of passionate supporters putting up graffiti. There are still a few "Ron Paul YouTube" stickers and scrawls on the freeways of Los Angeles. As great as it is to see that the Republican party still has a Libertarian streak, and as gigantic and interesting as the question of YouTube politics is, Ron Paul isn't the first Web 2.0 candidate either.

To find the first Web 2.0 candidate, you have to go all the way back to 2003.

"We fell into this by accident," Dean admits. "I wish I could tell you we were smart enough to figure this out. But the community taught us. They seized the initiative through Meetup. They built our organization for us before we had an organization."

Meetup is a Web tool for forming social groups. In early 2003, Dean himself was lured to an early New York City meetup where he found more than 300 enthusiastic supporters waiting to greet him. Meetup quickly became the engine of Dean's Internet campaign. Back then, the leading group on the site was a club for witches. Zephyr Teachout, Dean's director of Internet outreach, describes sitting across from campaign manager Joe Trippi in the early weeks and hitting Refresh again and again on her Web browser. "I was obsessed with beating Witches," she says. "Witches had 15,000 members, and we had 3,000. I wanted first place."


Howard Dean's candidacy happened because of Meetup.com.

One candidate using social software to change his party's fundraising policies and outspend the opposition by an overwhelming margin is exciting news. Two candidates coming on the radar through social software is a curious footnote. Three candidates makes it a trend. Expect to see more of this trend in future.

Ruby ORM API Design Clusterfuck

DataMapper criticizes ActiveRecord like Palin going after Obama. I'm going to avoid getting into that vortex of negativity, but I will say this: less ego. More ambition.

This is how you tell ActiveRecord you want to find all the Person models in your database whose age attributes are greater than or equal to 30.

Person.find(:all, :conditions => "age >= 30")

Or

Person.find(:all, :conditions => ["age >= ?", 30])

DataMapper thinks that's too much typing. Here's the DataMapper approach:

Person.all(:age.gte => 30)

Making code more compact is a worthy goal, but who writes a method named gte in a language which allows you to define >=? Where ActiveRecord is too much typing, DataMapper is too much remembering.

You can fork DataMapper and alias gte to >=. But I wouldn't recommend it.

Person.all(:age.>= => 30)

Here's how you do it in Ambition:

Person.select {|p| p.age >= 30}

Friday, October 10, 2008

Link Roundup: Zombies And Postmodernist Literary Theory

One of the worst programming projects I ever had prompted me to get Working Effectively With Legacy Code by Michael Feathers. It's a great book and it saved my ass. I follow Mike on Twitter now.

I'm also writing a zombies screenplay.



You got chocolate in my peanut butter!

Punishment In Public Sphere

For Derrida, zombies are creatures that produce undecidability, they blur and weaken the dividing lines that affirm binary relations such as life/death, presence/absence, as they threaten the consoling sense that we operate in a world governed by decidable fixed categories.

Night Of The Living Theorists

One of the theories which can be applied to zombies is Derrida and his idea of decentring. The loss of the centre is a shift from widely held norms of the time, and is usually brought upon by a major historical event...A zombie epidemic would destroy the notion that the only two options are life and death and there is no "living dead" middle ground. It would also change the notion that man is the dominant species.

Throughout history, there has also been a shift in the centre of the zombie universe itself.


Jean Baudrillard- Exterminating Zombies with Theory

the zombies of "Dawn of the Dead" could symbolize the ever growing use of signs over things signified. This process started off slowly, within the individual, but like the zombies, bite by bite, the death of the signified began to increase and before long the world is infested with nothing but signs (zombies). After this process was complete the world is left in a "hyperreal" from which there is no escape. These copies of a copy are seen in the mass produced zombie films are the simulacra that thrives in this "hyperreality."

Baudrillard would associate the American obsession with zombies to "a loss of the real".


We have Baudrillard and we have Derrida. Unfortunately, we do not have Foucault. The closest I could find was a book which references Foucault called Theory Is Dead - Like A Zombie. It's too bad. It seems like Foucault belongs in this list.



But we do have a consolation prize: Marx.

Zombie Ideology

It is in my understanding that zombies, are trapped in a Marxist prison. The zombie is alienated from its labor and as Althusser would say, alienated from its means of production...what do we classify the Zombie as? Is the zombie an Ideological State Apparatus or a Repressive State Apparatus?

Update: Zombies at the Stanford Encyclopedia of Philosophy.