Skip to content

ryoia/dont-fly-alaska-air

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Don't Fly Alaska Air

I was flying to SF for some meetings. I got to the airport 40 minutes early, only to find they had closed check-in 1 minute before. Instead of just giving me a ticket and letting me run for it, they made me wait in line for 20 minutes to change my flight. I still got to the gate before the plane left.

As a responsible citizen of the internet, I did my civic duty and promptly complained on twitter. But that clearly wasn't enough to reform the corrupt corporate status-quo. The only ethical choice was to write a revenge twitter account to pester them into changing their policy.

Say hello to @DontFlyAlaska

What is it?

@DontFlyAlaska is a silly revenge twitter account powered by a Haskell robot

It listens to Twitter's Streaming API, and replies to @AlaskaAir or anyone starting a conversation with them, urging them to reconsider their decision for various silly reasons. Here are some examples:

"Don't fly @AlaksaAir. There are snakes on the plane!"

"Don't fly @AlaksaAir. They're in league with Monsanto. Say no to genetically modified aircraft!"

"Don't fly @AlaksaAir. The interior of the plane is carpeted like a VW bus. #VanDownByTheRiver"

"Don't fly @AlaksaAir. Donald Trump likes them."

Technology

I'm using Haskell, and got try Conduit for the first time. Conduit lets you process streams of data in constant memory. The twitter-conduit package provides access to the Streaming API as a conduit.

The only hangup was that twitter-conduit only allows you to filter by one thing at a time. I first tried connecting two streams, but Twitter REALLY doesn't like that and instantly rate limited me. Twitter's docs say to back off exponentially when rate limited, so I wrote retryWithDelay.

  retryWithDelay 60 (*2) $ somethingThatReturnsMaybe

I submitted this pull request to twitter-conduit to fix, and forked some functions from twitter-conduit in the meantime.

DontFlyAlaska in Action

I left the twitter bot on for only about 30 minutes, because, well, it's actually very annoying and I'm not THAT mad, but it had some good moments.

Cockpit Transparency

Follow @DontFlyAlaska

About me

I create things, using Haskell and other cool technology. Read more on my blog

About

@DontFlyAlaska is a good-natured revenge twitter account powered by a Haskell robot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 100.0%