Cooking with Linux - Imaginary Languages
François! Our guests will be here any moment, and you are sitting back watching old Star Trek episodes! Yes, I know that the Klingons in the original series look different from how they do now, but why are you watching television when there is work to be done? As much as I enjoy the original series....Quoi? Yes, of course, it is silly to show every alien race as speaking English. It happens in most science fiction and in most fiction, for that matter. Having the characters on television spend weeks or months learning the basics of a language before getting down to action would make for pretty boring television. And, people constantly would have to invent new languages for us to hear. Yes, I know many people speak Klingon, but that's different. We will discuss this later, François. I can see our guests at the door.
Welcome, mes amis, to Chez Marcel. Your tables await, and François was just turning off the television, weren't you mon ami? Please, sit and make yourselves comfortable while my faithful waiter fetches the wine. There's a case of 2006 Cuvée Bacchus Pfaffenheim Gewurztraminer in the cellar's north wing. You remember, François—right next to the ancient Egyptian hieroglyphics tablets.
The world has numerous languages. Some languages are spoken by millions. English, for example, is perhaps the most popular language, spoken by countless billions throughout the galaxy—a little joke, mes amis. Other languages are more obscure, and some, although still spoken, are nearly forgotten or relegated to the pages of history. Then, there are the imaginary languages, which, amazingly, sometimes have a great many speakers—like Pig Latin or Klingon. Originally only a few words invented by Marc Okrand for the 1979 movie Star Trek: The Motion Picture, Klingon now boasts tens of thousands of speakers worldwide. The language is championed by the Klingon Language Institute.
Ah, François, you have returned. Please, pour for our guests. Enjoy, mes amis. This Gewurztraminer is a full-bodied white with deep fruit flavors, a nice floral bouquet and just a hint of spiciness. Don't forget my glass, François.
Where was I? Ah...Klingon is unique in that it originally was an imaginary language. Google, as we all know, runs thousands of Linux servers to do its magic, and in performing those searches, it tries to support as many languages as possible—including Klingon. For a Klingonese Google start page (Figure 1), visit www.google.com/intl/xx-klingon.
If you happen to be among those who speak Klingon, you might want to check out tlhaq, the Klingon clock, at Two Brothers Software (Figure 2). This graphical clock displays the time textually and numerically, using, of course, Klingon characters. Even if you can't speak the language, it's a pretty cool addition to the desktop, worthy of a warrior. Visit tlhaq.twobrotherssoftware.com and download the package.
This is a binary distribution, so there's no compilation required. You need the SDL_image and SDL_ttf packages installed on your system, however. Create a directory called tlhaq (or kclock, if you prefer), and extract the tarred and gzipped bundle:
mkdir kclock cd kclock tar -xzvf kclock.tar.gz
From that directory, you simply can run the tlhaq binary. When the clock is running, you can use some single keystrokes to modify its behavior. For instance, the S key toggles the text for the seconds on and off. Pressing + or - increases or decreases the font size. Should you find the text difficult to read, press F to switch between different font types (it still will be in Klingon though). If you want tlhaq to remember your settings, press C to save them.
I alluded to the idea that programming languages are, if not imaginary, at least artificial languages. Combining Klingon with programming hasn't escaped some Klingon enthusiasts. For instance, Unicode support for the Klingon language was added to the Linux kernel. Seriously. If you don't already have the Linux kernel source installed on your system, do so, and then check out the included file called /usr/src/linux/Documentation/unicode.txt.
Given this Linux Klingon support, there's var'aq, the Klingon programming language created by Brian Connors. He describes var'aq as “PostScript with a dash of Lisp thrown in”. Hmm...one wonders if Brian has ever worked in a kitchen. A programming language for warriors, var'aq can be downloaded from www.geocities.com/connorbd/varaq. Once you have it, extract the programming source. This is a zip file, which you can extract in the following way:
Once done, change to the varaq directory, and start the interpreter:
You also can start varaq in the native Klingon language version if you happen to speak Klingon:
var'aq is an unforgiving language. As if you would expect otherwise. There is no prompt to provide hints, but var'aq has no trouble telling you when you are wrong. Documentation is provided, so you can start writing your own operating system should you so desire. You might want to start with the classic “Hello world” program, keeping in mind that Klingons don't say hello:
"nuqneH 'u'?" cha' pong
The English version might make a little more sense:
"What do you want, Universe?" disp name
All programming languages, some might argue, are essentially fancy adding machines. On that note, you can use var'aq to discover the nature of the universe:
52 10 boqHa' cha'
This most certainly looks like the right place to take a break and have François refill our glasses. While you enjoy that lovely wine, let me direct you to another imaginary language—one of the very first learned by English-speaking children. Yesay, itway'say igpay atinlay. Pig Latin, as most kids will tell you, is as simple as taking the initial consonant, putting it at the end of the word, and adding ay to it. In that way, Linux becomes Inuxlay and Cooking becomes Ookingcay. Easy, huh? If you want to write large amounts of text in Pig Latin, it can, however, become fairly tedious. Luckily, there's a great little program to help do the job. It's called pig, and it comes with the classic bsdgames package (or bsd-games, in some distributions). To translate large phrases into Pig Latin, simply type pig at the command line, then type the phrase you want translated:
$ pig Linux is the world's greatest operating system. Inuxlay isway ethay orldway'say eatestgray operatingway ystemsay.
On a similar note, that same package comes with another tool for speaking in tongues. It's called rot13, and this is how you use it:
$ rot13 Linux is cool redefined. Yvahk vf pbby erqrsvarq.
As it turns out, rot13 is actually a cypher, albeit a very simple one. It takes the letters of a word, such as linux, and changes it by moving 13 letters forward (or backward) in the alphabet. In that way, linux becomes yvahk. To translate from rot13, simply re-enter the encrypted phrase using the same command. If you break the alphabet up into two rows of 13 letters, it's extremely easy to see how rot13 works:
Also in that bsd-games package is a translator for the computer world's most powerful language, acronyms. The program, wtf (which no doubt stands for “What's that frase?”) can help you decipher those strange words you find scattered on IRC and inside instant-message conversations. For example:
$ wtf rotfl ROTFL: rolling on the floor laughing
Cool, non? Although, it's arguably nowhere near as cool as the greatest imaginary language of all time. I'm talking about mock-Swedish.
The greatest (and funniest) television Chef of all time is without a doubt the Swedish Chef from the legendary Jim Henson's brilliant Muppet Show. If you never have watched the Muppet Show, please, do yourself a huge favor and buy yourself the DVD boxed set. You won't regret it. But, as I have been known to do from time to time, I digress...the Swedish Chef was funny largely in part because of his rather strange form of mock-Swedish—that and his hilarious antics and over-the-top recipes. Nevertheless, many thousands of people have, over the years, attempted to duplicate the language of the Swedish Chef. Now, your Firefox browser can bring the experience to any page you visit.
Firefox is an excellent browser on many counts, but one of its coolest features is the ability to add features and capabilities through a system of add-ons and extensions. Extensions are program enhancements that can change how you work with your browser dramatically. This framework of extensions makes Firefox not only a great browser, but also a superior browser. To experience Firefox extensions, click Tools on the menu bar and select Add-ons.
A window labeled Add-ons appears with a list of buttons to access installed extensions, themes and plugins already on your system. On a fresh install, there usually isn't much here. Most likely, the Get Add-ons button will be highlighted with a selection of recommended add-ons listed in the larger pane below. You can choose to add the recommended extensions, browse through a rather huge list of other extensions, or type something in the search bar to narrow the search. What does all this have to do with the Swedish Chef? Let me tell you.
Type bork in the search box, and press Enter. The dialog should display Anthony Howe's “Bork Bork Bork!” extension along with a description (Figure 3). There's also a nice, friendly button labeled Add to Firefox.
When you click that button, a new window appears asking for confirmation before going ahead and installing the extension (Figure 4). There's also a warning about installing malicious software. If you are comfortable with your choice, click the Install Now button.
That's it. Once the extension is installed, you'll see a message appear above the description telling you to restart Firefox before the extension actually can take effect. Firefox also provides a handy Restart Firefox button. Once the browser comes back to life, the Add-ons dialog appears once more to confirm that you have indeed installed the “Bork Bork Bork!” extension. Now, when I surf to a Web site, such as www.linuxjournal.com, I can right-click on the page and select View Bork Text from the menu. In a few seconds, my page is translated into something only the Swedish Chef could understand (Figure 5).
Another way to bork the text is to click View on the menu bar and select Bork text. To return your browser to a normal view, simply repeat the process and uncheck Bork text.
Sadly, the clock tells us that our time for speaking in various strange tongues is nearly over. Yes, mes amis, it's closing time. If you need to have François refill your glasses, which he will do happily, remember that he only understands English and French. Asking for a refill in Klingon is likely to frighten him. Please, mes amis, raise your glasses, and let us all drink to one another's health. A votre santé! Bon appétit!
Webinar: 8 Signs You’re Beyond Cron
11am CDT, April 29th
|Android Candy: Intercoms||Apr 23, 2015|
|"No Reboot" Kernel Patching - And Why You Should Care||Apr 22, 2015|
|Return of the Mac||Apr 20, 2015|
|DevOps: Better Than the Sum of Its Parts||Apr 20, 2015|
|Play for Me, Jarvis||Apr 16, 2015|
|Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites||Apr 15, 2015|
- Tips for Optimizing Linux Memory Usage
- "No Reboot" Kernel Patching - And Why You Should Care
- DevOps: Better Than the Sum of Its Parts
- Return of the Mac
- Android Candy: Intercoms
- Non-Linux FOSS: .NET?
- Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites
- Designing Foils with XFLR5
- Consent That Goes Both Ways