Hallelujah—In Praise of Babel

Angus Croll on 2017-12-07

with apologies to Leonard Cohen

Update 1: Now available in audio courtesy of the brilliant Shawn Wang Update 2: This is now the official song of Babel.js!

I heard there was a clever trick That rewrote all your JavaScript But you don’t really care for magic, do you Well it goes like this: the source, the dist The ES five, the ES six The sacred script transforming Hallelujah

Hallelujah, Hallelujah Hallelujah, Hallelujah

So I added all the shiny things Classes, spreads and template strings Through syntax sugared code I tried to woo you Generators, const and let I used them all without regret And it’s a terse and a destructured Hallelujah

Hallelujah etc.

Well my faith was strong but I needed proof The standard was my source of truth But TC39 meant nothing to you So even though you weren’t impressed I checked the build against the spec And it’s a more-or-less compliant Hallelujah

Hallelujah etc.

You say the build step’s too complex And you claim no need for ES Next Well I used to think that way before I knew you But your code grows older with each line It’s a joyless dirge on a withered vine It’s a threnody for a bygone Hallelujah

Hallelujah etc.

Yes I learned about the danger signs How they’d polyfilled a thousand lines The cost of using Maps and Symbols threw you Still I disregarded common sense Now my source is small but the build’s immense And it’s a slow and unresponsive Hallelujah

Hallelujah etc.

There was a time when they let me know What’s really going on below But now there’s only source maps there to school you And debugging’s not a progress march It’s a frenzied fumble in the dark It’s a labyrinthine search for Hallelujah

Hallelujah etc.

Well, maybe there’s a god up there But all I ever got from prayers Was broken builds and errors that would spook you And the anguished cry that you hear at night Is the plugin I forgot to write It’s a cold and it’s a broken Hallelujah

Hallelujah etc.

Here’s Cohen’s original lyrics for comparison…

I heard there was a secret chord That David played and it pleased the lord But you don’t really care for music, do you Well it goes like this the fourth, the fifth The minor fall and the major lift The baffled king composing hallelujah

Well your faith was strong but you needed proof You saw her bathing on the roof Her beauty and the moonlight overthrew you She tied you to her kitchen chair She broke your throne and she cut your hair And from your lips she drew the hallelujah

Baby I’ve been here before I’ve seen this room and I’ve walked this floor I used to live alone before I knew you I’ve seen your flag on the marble arch But love is not a victory march It’s a cold and it’s a broken hallelujah

Well there was a time when you let me know What’s really going on below But now you never show that to me do you But remember when I moved in you And the holy dove was moving too And every breath we drew was hallelujah

Well, maybe there’s a god above But all I’ve ever learned from love Was how to shoot somebody who outdrew you It’s not a cry that you hear at night It’s not somebody who’s seen the light It’s a cold and it’s a broken hallelujah

You say I took the name in vain I don’t even know the name But if I did, well really, what’s it to you? There’s a blaze of light In every word It doesn’t matter which you heard The holy or the broken Hallelujah

I did my best, it wasn’t much I couldn’t feel, so I tried to touch I’ve told the truth, I didn’t come to fool you And even though It all went wrong I’ll stand before the Lord of Song With nothing on my tongue but Hallelujah