"Buffer Overflows" (a rap battle)

Today’s Creation for NaCreSoMo is a rap battle in the style of Lin-Manuel Miranda between C programmers and Swift programmers.

Yes, really.

If you want, imagine “C” as Burr and “S” as Hamilton.

(C: So whatcha got for me, S? What's it gonna be now?)

(S: I can't believe you're still stuck in the past, C. Let's do this.)

(C: Bring it on.)

C: You think you're so cool but you'll be gone before long
   We've been here for 40 years and we're still going strong
   Everybody else, they aspire to be us, but you can only C us, ideas
   That strike everyone's fancy, well go dancy round your toy
   At least that way it's only your coworkers annoyed
   And you've got to admit it's been a heck of a ride
   But history is on our side.

S: Look, C, you've been here an awfully long time.
   And I don't mean to disrespect your contributions---
C:                                                  ---That's fine.
S: But your way of doing business isn't safe anymore
   Nowadays people writing programs want something more
   We're not in the 386 days anymore
   And your cavalier attitude has got the rest of us sore.

(C: Name one thing that you can do better.
    /Without/ resorting to some ridiculous dynamism.
    If you want to write Python you can go do that somewhere else.)

(S: One thing, huh? All right.)

S: There's a lot on the plate but let's pick just the one.
   The cause of so many crashes and hacks we've just begun
   to discover. Why not cover this with a bounds-checking plan?
   Your backwards-compatibility says you can't but we can!

(C: Overflows, huh?)

(S: That's right.)

C: Look, overflows are bad, but the tradeoffs are good.
S: By your program performing---
C:                           ---exactly how it should.
   If you program it right you get down to the metal.
S: Assembly doesn't look like C any more unless you meddle.
C: Look, overflows are the reason ASan was invented.
S: Overflows are the reason Heartbleed was effected!
C: Harsh---
S:      ---But deserved. Heartbleed was a disaster!
C: A case that never would have been tested until after anyway.
S: I'll grant that---
C:                ---Though a good fuzzer's worth looking into.
S: I can't argue with that, but when the bugs do slip through...
C: So what's the alternative, contractual purity?
S: Would you prefer to save your uptime or your users' security?
   So we abort on bad input. We do it deteriministically!
   That's better than trying to stumble on naïvely optimistically.
C: You say that now but would you say it again
   When your whole server goes down from an off-by-one end?
S: You know that I would---
C:                      ---And that's the difference between us.
   I'll handle the Earth. Go play on, I dunno, Venus.

S: I agree that's the difference between us. That's true.
   But there's one of us that's actually reliable, and it isn't you.
   Look...it doesn't have to be us
   There's also Go, Julia, Kotlin, or Rust
   Or at /least/ your old one-time friend, C++!
C: Heh. "You get what you pay for?" Is that where we are?
S: Sometimes a little bit of checking goes far.

Both: I swear your pride will be the death of us all.
      Beware, it goeth before the fall.

The inspiration for this was actually a tweet that just happened to come across my Twitter feed:

I couldn’t help but read these as Hamilton lyrics, which made me want to write my own Miranda-style rap (though not about 45). It also made me wonder why I so quickly identified these as Hamilton lyrics. But let’s compare:

Hamilton: Since when are you a Democratic-Republican?
Burr: Since being one put me on the up-and-up again

Hamilton: You changed parties to run against my father-in-law
Burr: I changed parties to seize the opportunity I saw

Relatively long lines with a few cut short, parallel structure, multiple speakers, polysyllabic rhymes, and a simple enough rhyming scheme (AABBCC), at least for the back-and-forth songs. This is enough of a pattern for me to identify as Lin-Manuel-Miranda-esque, and it made his influence clear in Moana:

What’s the lesson, what is the takeaway
Don’t mess with Maui when he’s on a breakaway!

…So I read @Xaosopher’s tweet as Hamilton lyrics,
changed the topic to be about programming (and Swift in particular)
and made this.

I’ve been sick the last few days, so I’m not going to try to perform this today. Maybe later in the month.

Part of NaCreSoMo 2017. Join us!

blog comments powered by Disqus