CoffeeScript, monkeys, and coffee

We have donned our geek hats, we've affixed our elfin pointy-ear-toppers.

This week, we have donned our geek hats, we've affixed our elfin pointy-ear-toppers, and we've arranged a battle re-enactment weekend in Hastings.

We've also been learning all about dynamic programming languages. Why? Well, dear Chroniclers, it's all for you.

Hide Ad
Hide Ad

If you don't know your ambient occlusion from your polymorphism, you think an iPad is a cure for conjunctivitis, and you assume Quick-and-Dirty, Shebang and Underflow are feature films of an adult nature, then we're here to help. We're here to tell you that Bugfairy is not the Easter Bunny's nemesis, a Magic Quote isn't "abracadabra", and Tail Recursion is not an evolutionary relapse.

Get your notebook ready for a crash course in locating your inner geek. When we say notebook, we mean an actual pad of paper - not an electrical device.

They say that if you put a monkey gang in a room of computers, they would eventually create the works of Shakespeare. Please note, the correct collective noun for monkeys is actually not gang. Barrel, cartload, tribe, troop, and wilderness are all correct depending on which type of monkey you're talking about.

"They" who came up with the Shakespearian monkey theory weren't specific about whether an orangutan would do a better job than a chimp, so we feel gang is acceptable here. We are also in danger of digression, if we don't desist from the debatable debacle of deciding upon a suitable sobriquet for our simian sidekicks. The monkey gangs' ability to pen The Tempest is wholly irrelevant anyway. Unless they were capuchin monkeys. They're named after capuchin monks. Cappuccino is named after them both. Anyway, let's get back to your lesson in how to speak geek.

Hide Ad
Hide Ad

A programming language is how we communicate our demands to a machine like a computer. Programming languages can transcomply to each other. Transcomply means to take one source code (language) and turn it into another. If the language is dynamic, it is of a high level and performs behaviours during runtime. Runtime means that a program is running. So far, so good.

Syntactic Sugar makes the language easier to understand, or "sweeter". It can be removed from a language without affecting the functionality. This is called Desugaring. Kaleidoscope, Timber, and Babbage are all programming languages. The languages are written by humans and once they're ready for use they undergo a stable release and we can all download them from the internet.

Jeremy Ashkenas is a human. He works in the graphics department of The New York Times.

Right then - time to put your newly-acquired nerdy knowledge to the test. In 2009, Jeremy Ashkenas created a dynamic programming language that transcomplies to JavaScript. Inspired by Ruby, Python and Haskell, it adds syntactic sugar and is designed to aid list comprehension and pattern matching. In February, Jeremy's new language was ready for stable release.

Just like Shakespeare, apes will one day complete,

Two lines of verse with perfect metric feet,

"What's in a name? That which we call a rose,

By any other name would smell as sweet."

Hide Ad
Hide Ad

Our rhyming couplets in iambic pentameter, teamed with the immortal words of Shakespeare (well actually of Juliet) lead us into revealing the point of our linguistically-irritating column this week. Jeremy named his language CoffeeScript, and that is the tremendously tenuous link that's caused your enforced educative excursion into confusing communicative commands for computers.

At least you learned the collective nouns for monkeys. That'll be handy.

Related topics: