Jump to Navigation

Chef Marcel at your service!Food, Wine, and Linux may seem like a strange combination, but combining three passions can be a wonderful thing. I'm Marcel Gagné. Those of you who read Cooking with Linux, the multi-award-winning column that appeared monthly in Linux Journal magazine for 10 years, likely agree. With the help of my faithful waiter, François, Restaurant Chez Marcel serves up the finest in Linux and open source software paired with exceptional wines.

In that same spirit, this site features great Linux and Open Source software, ongoing wine tasting reports, recipes, and the occasional restaurant review. If you came here looking to read past Cooking with Linux columns, you'll find newer releases on the front page, a comprehensive list here and under the "CWL, The Column" menu link to the left. A votre santé! Bon appétit!

Blogs

ALICE and friends. Artificial Intelligence Reloaded

If you've been following my posts on artificial intelligence (or AI, if you prefer), you may have already spent some time playing with Eliza and consulting with the Emacs Doctor. I hope so because I'm going to take this one step further. Log in to your Linux system and let's get going . . . 

As much fun as the emacs doctor might be, you'll soon discover that it's not much different from our friend, Eliza. For a more credible machine intelligence, you'll soon run into something called AIML, or Artificial Intelligence Markup Language. Much of the energy that has gone into developing AI programs of late focuses on AIML interpreters and the A.L.I.C.E. system created by Dr. Richard Wallace (more on this shortly). Dr. Wallace won the 2000, 2001, and 2004 Loebner prize for the most 'human' program; that would be the bronze since no one has yet claimed the gold.

There are many AIML chatbots out there. Some masquerade as famous people like Captain Kirk, Elvis, or God. And yes, you can chat with them on their respective Websites. If, however, you'd like to get into the AIML action yourself, start with one of the projects built on this language. Like Howie.

Meet the Emacs Doctor

In my last article on the subject of artificial intelligence (or AI, if you prefer), I introduced you to Eliza, a computerized psychiatrist. Eliza may be simple, but she is patient and she's happy to let you talk.

Speaking of therapy, and at the risk of opening up old wounds and old battles, specifically the "vi vs emacs" conflict (the answer is vi, or vim), let's consider another form of AI therapy.

The original Eliza program was written using an early version of Lisp. It is not surprising then that one of the most famous examples of Lisp development included with your Linux system, the Emacs editor, should pay homage to the good doctor. When talking about Emacs, it becomes almost difficult to classify it as strictly an editor. The brainchild of Richard M. Stallman (founder of the Free Software Foundation), GNU Emacs is more than just a nice, powerful, if somewhat complex, editor. It's a mail reader, news reader, web browser, program development environment, Lisp interpreter and psychotherapist. No, really! I kid you not.

Try this. Start Emacs by typing emacs. You do not have to specify a filename for this. Now, press Esc-X, then type doctor and press Enter. The doctor is in. More so, the doctor lives! Note my conversation with the Emacs doctor in Figure 1.

Figure 1: The Emacs doctor IS in!

As much fun as the emacs doctor might be, you'll soon discover that it's not much different from our friend, Eliza. The advantage here is that, the doctor is always in, assuming, of course, that you have emacs installed. So next time you find yourself contemplating the meaning of life while you are in the middle of some stubborn Python code, save your work and just call up the doctor. It's free software so you can keep the 5 cents.

Need A Psychiatrist? Meet Eliza

For some of us, our original exposure to AI, or artificial intelligence, goes back to an old program called Eliza. Eliza was a kind of computerized psychiatrist written in the 1960s by Professor Joseph Weizenbaum at the Massachusetts Institute of Technology. Eliza (named after the character in George Bernard Shaw's "Pygmalion") was an exercise in human response and natural language communication with so-called machine intelligence. The version I played with all those years ago was a DOS program running on a TRS-80. Ah, nostalgia. Eliza may not have been a great doctor, but it was a fun and fascinating program, a kind of whimsical promise of the future of AI.

Over forty years have passed since Eliza made her debut in 1966. You can still find incarnations of her everywhere on the Internet. Eliza's ghost is represented in many of the bots and chatterbots you'll find on IRC channels and MUDs. In fact, you can download Eliza as a Perl module and experiment with the creation of your own bots using your own Linux system. The code is available at the CPAN repository or the Comprehensive Perl Archive Network. You can find the latest incarnation at http://search.cpan.org/dist/Chatbot-Eliza/ .

The file is called Chatbot-Eliza. When I picked up my copy, it was version 1.04 and I installed it in the following way.

tar -xzvf Chatbot-Eliza-1.04.tar.gz
cd Chatbot-Eliza-1.04
perl Makefile.PL
make
sudo make install

In the installation directory, you'll notice a file called simple. You can use this as the basis for creating your own AI, or you can simply execute the script by typing ./simple as I did in the following example:

$ ./simple
Welcome to your therapy session.
Your therapist's name is Liz.

Liz:    Is something troubling you?
you:    I'm concerned about artificial intelligence.
Liz:    Do you know anyone else who is concerned about artificial intelligence?
you:    Several people I know have different concerns regarding the subject.
Liz:    What differences do you see?
you:    Some are excited about computer intelligence and others are frightened.
Liz:    Do computers worry you?
you:    Not particularly.
Liz:    Tell me more about that.
you:    I've always had a fondness for computers, real or fictional.
Liz:    What about machines worries you?
you:    That they might actually understand what i am talking about.
Liz:    Are such questions much on your mind?
you:    Are they on yours?
Liz:    Possibly they are they on mine.
you:    Do you have anything else to offer?
Liz:    We were discussing you -- not me.
you:    I see. I should probably go.
Liz:    That's quite interesting.
you:    Goodbye.
Liz:    Goodbye.  It was nice talking to you.

The script that calls the chatbot can be extremely simple, hence its name. If you don't like the name Liz or the introductory text, edit the file and change it here.

use Chatbot::Eliza;
$chatbot = new Chatbot::Eliza 'Sigmund';
$chatbot->command_interface();

Make the script executable and run it. In this case, I have renamed my chatbot Sigmund. The default name is actually Liz. In the distribution directory, you will also find a file called doctor.txt that can be used as the basis for your own bot. I created one called mywords.txt from the doctor.txt file and modified my startup script slightly:

#!/usr/bin/perl -w
use Chatbot::Eliza;
$chatbot = new Chatbot::Eliza {
        name => 'Turing',
        scriptfile => 'mywords.txt',
        };
$chatbot->command_interface();

Now I start my script with the command ./myai, and this is the result:

$ ./my-ai

Turing: Well, well. Another person trying to see if machines can think.
you: There's no doubt that I am curious.

Particularly interesting in this distribution is an included script called twobots that lets two Eliza bots talk to each other. The resulting discussions can be quite interesting. You'll also find a script called simple.cgi so that you may add your own Eliza chatbot to your web site and share your therapist, or whatever you want Eliza to be, with the world. 

Artificial? Definitely. Intelligence? Depends on who you ask, I suppose.

Have fun!

Who cares about your dang Desktop Environment?!

Well, actually . . . I do.

If you are into such things, and you place your faith on those distro popularity numbers over on DistroWatch, you'll see that Ubuntu has dropped from its number one position, a position now held by Linux Mint. Heavens, no! Surely the universe is about to implode! And isn't even 2012 yet! 

Sorry about that. The reason for Ubuntu's decline from that venerated number one position has been speculated on by tea leaf readers everywhere (i.e. my fellow tech journalists). Much has been made about the Canonical's embrace of Unity over traditional GNOME and I am among the guilty when it comes to that. I happen to dislike Unity but I do like GNOME 3. This, oddly enough, puts me at odds with the majority of people who runs GNOME in one way or another though more people seem to hate Unity than GNOME 3 --  I could be wrong. The question, however, is this . . .  

Has Canonical shot itself in the foot, giving up its number one position, by adopting and sticking by Unity? Does the choice of desktop environment matter that much? Are Linux users, who traditionally just install and run whatever they want, regardless of what it presented to them, really that irked about Unity that they are abandoning Ubuntu? Okay, that's at least three questions.

Which brings me to my Ubuntu and Linux Mint experience.

You could say I've had a love/hate relationship with Ubuntu going back a long ways. Ubuntu, or in my case, Kubuntu, and I have parted ways several times (see my "Crisis of Kubuntu Faith" video), only to get back together a few months later. I got to loving Ubuntu and Kubuntu so much that I became senior editor of Ubuntu User Magazine. But even in that role, I was regularly drawn to Linux Mint, an Ubuntu-based distribution that was particularly friendly to Windows-refugees, mostly due to the fact that it came with all those lovely proprietary codecs and plugins that you always have to load whenever you install a new distribution. Linux Mint was, as I called it a couple of years ago, Ubuntu done right.

So when I blew away Windows and loaded up my new notebook, I naturally went and downloaded the latest Linux Mint. I did that partly because I've gotten into the habit of recommending it to my non-Linux friends who are looking to improve their desktop experience. That's my snarky way of saying "leaving Windows". But I digress . . . 

Three weeks pass and I start to get a little antsy. This Linux Mint is okay, but the KDE implementation, is way out of date. Mint has seemingly abandoned my favorite desktop interface. Seeing as I am particularly good at this Linux stuff, I figure it's no biggee. Besides, I like playing on the bleeding edge, despite having gotten bloodied more than once over the years, and so I add the apt repositories for Project Neon, the true bleeding edge of KDE.

Except that I do also like to have, at my disposal, the current stable version of my software, including my desktop environment. While there's some talk on the Linux Mint channels about a new KDE distribution coming some time soon(ish), I can no longer pretend. Linux Mint has let me down. Last night, I downloaded the latest Oneric-based Kubuntu and installed it on my computer. My OS is up to date and I've got a recent, and stable, KDE (and Project Neon too). 

The point of all this is that I have, more than once, abandoned a distribution for its desktop environment, or its support of a desktop environment. And, as I demonstrated last night, I'll do it again. And again. You can subtract one from those Linux Mint numbers and add one to Kubuntu because I'm back to Kubuntu, Baby!. You're dang right the desktop environment matters. It matters a lot. To me. And to others. Is this, however, what's hurting Ubuntu's numbers? Maybe not, but it's not that crazy an idea. 

So . . . are you a until recently happy Ubuntu user who has switched to Linux Mint? Was it Unity, or something else?

As for my opinion . . . I also loved Window Maker and used it for years. Read into that what you desire.

Has Linux dropped off the face of the Earth?

Over on my mailing list, the WFTL-LUG, a "whatever happened to" discussion has emerged in part because question traffic has gone down dramatically. Fewer people are coming out to LUG meetings. It's as if Linux is fading away.

"Has Linux dropped off the face of the Earth?" The answer is obviously no. Linux is still around, stronger than ever, but the desktop OS does seem to be disappearing. Of course this is true of Windows and Mac OS, at least from the average user's perspective. Desktop Linux is strong with those who use it; those who have been using it, but the buzz seems to be gone. 

None of this surprises me though. Sure, we may never see the Year of the Linux Desktop, but the nature of the desktop is changing. People are increasingly living their lives online. Yes folks, it's that cloud you keep hearing about and it's really out there. Google+ and Facebook and Twitter and online document management and email and just plain old Web surfing. For most, the network really is the computer and as time goes on, people care less and less what is running on their computers and more about what they can access once they get online.

For a while there, it looked like netbooks were going to be the big thing with Linux getting another shot at the elusive desktop. Now it's tablets and smartphones everywhere you turn. And what's emerging as the de facto operating system of the tablet and smartphone world? Something called Android. Those of us who have been doing this FOSS thing for a long time still see Linux back there somewhere. Android is the evolution of Linux for the mobile world.

And what of the old Linux? It's still out there, and it's bigger than ever before. It's everywhere. It's everything. It runs the infrastructure that makes the mobile world work. Mail servers and media servers and Web servers and application servers and every kind of server you can think of.

Want to know just how good Linux and free software is these days? Get this. Linux has become invisible. Maybe that's how you measure real success.

World domination? Been there. Done that.

Cloud Computing Course, Part 2: Amazon's EC2

What if you could get a Linux server running in 5 minutes or less and have it cost you a couple of cents per hour? You can, and I'll tell you how.

Probably the easiest way to launch a virtual machine in the cloud is by getting yourself an account with Amazon Web Services. Essentially, that means you need a credit card so you can be billed for the time and resources you use. The price per hour for a small instance (the default machine) is 8.5 cents per hour. If you run your test machine for a hundred hours, it will cost you $8.50 -- larger deployments cost more, obvioulsy. Take that over the course of a month and you're paying as much for a small system as you would renting physical hardware from a hosting provider. One important difference here is speed. Where you may have to wait a day or two for a machine from your hosting provider, creating an EC2 virtual machine is blindingly fast in comparison. Deploying a new machine here takes only a few minutes on average.

Amazon also has a "micro" instance which you can get for only 2 cents per hour. Tiny mean you only have 8 GB of disk (EBS, or Elastic Block Storage) and 613 MB of memory. Performance is low, but hey, it's only 2 cents an hour. Great for testing.

Everything takes place from the Amazon EC2 management console (see Figure 1).  The dashboard view shows you current instances (what Amazon calls your virtual machines), what type they are, their status, IP address and so on. The dashboard also lets you sort on a variety of criteria including the region in which your machine is deployed (you can have machines in Virginia, California, Ireland, or Singapore). It also provides access to your volumes (storage devices), snapshots, security profiles, SSH key pairs, and pretty much anything having to do with running a virtual machine in Amazon's cloud.

Unity: Running a same program on many workspaces

Running multiple sessions of the same program simultaneously in Ubuntu Unity requires a different approach than what we are use to in Gnome. This video shows you how. http://www.youtube.com/watch?v=otaSUoE7xKo The solution described in this video was something that I stumbled upon, while refusing to give up until I found a way around the problem.

Give Unity A Chance

With Ubuntu 11.04 the Ubuntu Linux brings a new look to the desktop called Unity. I have installed Ubuntu 11:04 on a desktop computer and very soon, I will install it on my laptop and net-book. There have been mixed reviews of Unity; I have found Unity to be different and will take a bit of time getting use to. That said I would encourage all of us to give Unity an extended test period.

Cooking With Android

Way back a  million years ago or so (early March), I asked the WFTL-LUG mailing list about Android tablets. Since then I've bought two tablets and I have, as you might expect, been trying out different applications to go with it. Since I expect to post a fair bit on the subject as I try software, buy new hardware (will likely happen), and otherwise muck about with Android, I've decided to spin off a site dedicated to my thoughts on the subject.

It's called Cooking With Android and you can find it here: http://cooking-with-android.com

First post (Taking Android to Dinner; First Date) just went up with more to come in the next few days, weeks, etc. Feel free to register, leave comments, make suggestions, etc. 

Firefox Dethrones Internet Explorer

The European Parliament has not been passive about the dominance of a powerful corporation and its impact on the daily lives of so many constituents. Of note, they have forced Microsoft to include Firefox along with Internet Explorer with the Windows operating system. Since March 2010 European users have had a choice of web browser to install on their computers.

Pages

Subscribe to RSS - blogs


Main menu 2

by Dr. Radut.