Dealing with EC2 Internal Compiler Errors

As my hosting needs grow, I am continually surprised at how well Amazon EC2 t1.micro instances meet those needs as long as I’m serving up rather static or barely dynamic content. However, they sometimes fall short when intense computational, CPU, or network bursts surface.

The Problem

While compiling a daemon from C++ source in my t1.micro, it stopped with an unusual error:

g++: internal compiler error: Killed (program cc1plus)

The last few lines of output from dmesg showed the cause:

[26601705] Out of memory: Kill process 30909 (cc1plus)
[26601705] Killed process 30909 (cc1plus) total-vm:592952kB, anon-rss:548596kB, file-rss:0kB

The t1.micro instance simply ran out of memory needed for the compile.

The Solution

Create a 1GB swap file that enables some of your disk space to be used for memory:

sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile

The process on the tiny instance was as achingly slow as expected, but after an hour of maxing out the CPU at 100% my daemon finishing compiling without any additional errors. Any glitches found thereafter were the fault of my own programming, and not the compiler.


Curbing the Grammar Nazi

I admit it: I am a sociodescriptive prescriptivist.

For the better part of several decades, I have been a self-described Grammar Nazi, a fanatical grammar snob. While I never reached the heights (or depths) of those similarly obsessed who wield black Sharpie pens and bottles of White-Out to vandalize bus-stop advertisements and wall-mounted eatery menus with their copy edits, I have long half-admired their antics and the required ballsiness to perform them that I lack.

It’s not entirely my fault; I am a product of my upbringing. As an infant, I attended school with my mother at university as she studied to be an English school teacher; it is certainly possible that it was there that I absorbed the proper use of the oft-abused apostrophe, the serial comma, the lonely semicolon. In my early teens, while perusing a menu at whatever neighborhood Asian restaurant or pizza parlor we happened to dine, my Dad and I would race to locate such classic dishes as “rorsted chicken” or “side of rice and scorn”, a practice I continue today with my own son. But before even that began in earnest, I was forever ruined by my first-grade teacher.

I am a product of two continents — while I was born in the United States, I spent my formative years in England. As bad luck would have it, I was teased in England for my youthful American accent, and mercilessly teased upon return thanks to my pronounced British accent. I couldn’t win. Accent aside, I learnt to write in British public schools, not American ones. My first-grade teacher in the United States consistently gave me poor marks for spelling. One rueful day, fed up, I confronted her in the middle of class. Angrily, I pointed at each of the red-checked words, “What’s wrong with them?” Each, she huffily explained, was misspelled. No, they weren’t, I insisted. I grabbed the dictionary from her shelf and proceeded to show her every “misspelled” word. “If they’re in the dictionary, they aren’t spellt wrong, are they?” I asked with as much haughtiness as I could muster. The word amongst is the one that I still vividly remember to this day. While archaic even back in the ’70s, at least I had used the American spelling. Unfortunately, even though she was clearly wrong, my teacher refused to back down. A grammarian was born.

A few years ago, I hit rock bottom. Omitted (or extraneous) apostrophes or incorrect capitalization distracted me so much that I was frequently compelled to physically shield my eyes from the wall-projected offenses during business meetings in order to rely on aural input and deflect my focus back to the import of what was being meant, not what was incorrectly written. The errors became truly offensive, beacons of putrescence, literally screaming at me in rabid, frothing glorification of their unjust but undeniable existence. Just as an alcoholic must first admit they have an addiction before they can truly begin to loosen the shackles, the admission that I, too, was an addict — a grammar addict — was the first step. I am still in recovery.

I used to highlight so many errors on resumes that crossed my desk that they had more yellow pockmarks than a fair-skinned, green-eyed redhead has freckles on a sunny Irish afternoon. With admission of the addiction came slowly a slight softening of strict standards, beginning with the realization that it is less important which standard is used, as long as any standard is consistently and appropriately used. Today, unless I’m hiring a professional writer, my standards are much more relaxed. I am much more likely to forgive an engineer for incorrectly listing “JAVA” in his list of programming language skills, as long as he is consistent in the mis-capitalization. A development manager who refers back to his work experience “in the 90′s” might still proceed to the interview stage as long as he is consistent in his mis-use of the apostrophe. That said, a marketeer who spits out 140-character tweets with “u” or “2″ in place of “you” or “to/too/two” may not display such inappropriate grammatical disregard when posting a status on Facebook, whether corporate or personal.

My cousin Meg recently reposted on Facebook a link to an article that catapulted me significantly across the chasm of recovery. The author, Mary Rolf, also a self-proclaimed grammar snob, recounted her own moments of epiphany that “changed [her] whole outlook, not just on grammar but also on the social impact of language.“, and solidified my own loosening standards in concrete terms.

There are two schools of thought when it comes to how we should use language. One is “prescriptive” and it’s backed by grammar snobs and the kind of people who froth at the mouth over the decline of “the King’s English”. The other is “descriptive” and it’s more about accepting that how people use language is how language works. A prescriptivist believes in the idea of standard English and sees mistakes everywhere. A descriptivist sees many englishes [sic], and none of them are standard.

Descriptive linguistics is the objective analysis and description of how language is (or was) spoken by a group of people in a community, without the bias of preconceived ideas about how it ought to be. On the other hand, linguistic prescription, predominant in education and publishing, seeks to define standard language forms and provide subjective guidelines on the appropriate use of language. While prescription and description are complementary, descriptivism is the belief that description is more significant or important to teach, study, and practice than prescription. A grammarian must understand and conceptually embrace the two linguistic schools before attaining the optimum compromise of “sociolinguistic prescriptivism” — prescriptivism based on the application of socially relevant descriptive linguistics.

What that mouthful means in plain English is to apply the rules of grammar and vocabulary using standards dictated by the social setting. How people use language is how language works, especially socially. Twitter imposes an artificial constraint that impacts adherence to formal language standards, establishing its own unique norm. The Pavlovian leg-jerk responses generated by mobile messaging typically belie formality. Socialeconomic, educational, anthropological, and cultural factors also impact use of language. Teens unconsciously recognize this intuitively; emails or messages they send to their parents or teachers are generally less informal than those sent to their BFFs.

Description is sinking in, although it has a Titanic’s chance of being unsinkable as it does entirely replacing prescriptivism. It’s now OK that my boss makes spelling mistakes while we’re informally collaborating on the overhead. It’s OK that the five-year mission was to boldly split infinitives in the name of entertainment. It’s OK that my Ukrainian-born daughter with less than four years’ exposure to English informally texted me that she was waiting for me and “siting on the bench outside”. It’s OK that I used “less than” in the previous sentence instead of the more traditionally correct “fewer than” because it is contextually and socially appropriate. It’s OK that in the name of artistic licence, I sometimes spelled spelled as spelt and othertimes spelt spelt as spelled since spelled may be spelled spelt or sometimes spelt spelled, depending on which English is being writ at the tyme.

Yet the average grammar snob is wholly prescriptive, afflicted with the inability to make or accept these social distinctions — myself not unrecently included. Lurking behind that mask of affliction is the knowledge that the English language is being socially changed by the ever-increasing population of people that don’t know any better, don’t give a dåmn, or it’s not their job to care. Grammar Nazis see themselves as the last bastion of proper English, crusaders in a losing battle to educate the uneducated, to carve out some perfection in an imperfect, chaotic, changing world in which the current form of English is being flavoured by the homogenous melting pot of an increasingly universal language. The author of a formal publication should be literally boiled in oil for the slightest of grammatical errors, any comments appended with an unsolicited “You’re welcome!” as if the literary offenders must also be educated on the necessity of gratitude, like it or not.

However, grammarians must avoid the parallelling stigma of the KKK or the Nazis, and accept sociolinguistic prescriptivism such that usage of formal English is much like the usage of formal clothing. Just as one should not expect their cardiologist to show up in surgery unshaven and wearing a dirty, holey T-shirt, one also should not expect their gardener to mow the lawn wearing a Caraceni suit. Conversely, on his days off, the surgeon can don his bathrobe and slippers on his front lawn for all I care. In the words of Robert Randolph and the Family Band, “Ain’t nothin’ wrong with that.”

I will leave you with this final philosophical thought experiment: If a grammar snob comments on an article, have they contributed anything meaningful to the conversation?”

 


A Capella, A Cappella, Acappella, or Acapella?

For my son’s 14th birthday we attended a concert by Straight No Chaser, a 10-man singing group. He was thrilled, as were we all, with the always entertaining and often humorous modern take on a variety of genres. After the show, we purchased for him the deluxe edition of their latest CD, Under the Influence, and he was lucky enough to get the front and back CD liners signed by all ten singers.

My next task when I got home was to rip lossless tracks onto our “jukebox”, a NAS media server that holds all the content for our various iDevices and receivers. While using iTunes to convert the tracks, I perused other similar vocal tracks already existing in our jukebox — by Acoustix, the Swingle Singers, and the Whiffenpoofs. I then realized that, thanks to community-driven databases such as Gracenote, the genre spellings were inconsistent. What is the correct spelling of the genre: a capella, a cappella, acappella, or acapella?

A Capella vs A Cappella

Technically, both spellings are correct; “a capella” (with one P) is the Latin spelling, whereas “a cappella” (with two P’s) is the Italian spelling. Slightly muddying the proverbial waters is that the phrase meaning “to the chapel” or “in the manner of the chapel” originated in Italian Catholic churches — in which most texts and records were written in Latin. However, for the past several centuries, written or printed musical notations used to indicate note dynamics (defining characteristics such as loudness, duration, frequency, or style) are written in Italian or use abbreviations of Italian terms:

  • crescendo (abbreviated cresc.) – gradually becoming louder, from the Latin crēscendum.
  • fortissimo (abbreviated ff) — played very loudly, from the Latin fortissimus.
  • fortepiano (abbreviated fp) — played loudly and then immediately softly.
  • staccato (abbreviated stacc.) — played shorter and detached, from the French distaccare.

While there are many musical directives originating in non-Italian languages (such as the German ängstlich, the Polish wolno, or the Latin ad libitum), due to the overwhelming prevalence of Italian, the Italian form a cappella is preferred for consistency.

Without a Space

The concatenated forms of “acapella” and “acappella” originated in the United States, unfortunately popularized by incorrect spelling on popular album titles or liners. The indefinite article “a” is so prevalent in English that other mid-sentence usages of the single lowercase letter are unusual; understandably, the sentence “He sang a song a cappella” appears a bit more confusing that would “He sang a song acappella”, however the second version is incorrect.

Conclusion

The proper spelling of the note dynamic is “a cappella”. For use in iTunes, where all accepted genres are stylized with initial-caps, the genre should be “A Cappella”. While it pains me greatly, when an artist name or album title or track incorporates an incorrect spelling of a cappella, the incorrect spelling should be used.

  • On Jon Cleary’s album Occapella, the genre of the title song Occapella is still “A Cappella”.
  • The genre of the third track, Free [Tiefschwarz Accapella Version], on the compilation album Defected Accapellas 11 is also “A Cappella”.
  • The  “60′s Accapella Hits Volume 1″ and “Acapella Super Hits – Dance Collection 1″ compilation albums released by Acapella Vocalists feature a cappella songs by various artists. The genre of all is “A Cappella”.