Sat

Apr 29
2006

Tim O'Reilly

Tim O'Reilly

IM and the Command Line

O'Reilly publishing tools maven Andrew Savikas wrote to me in email: "This afternoon as I was alternating between some shell work and an IM conversation, it occurred to me that using the command line is kind of like IMing with your computer -- stimulus/response, abstruse notation, and occasional (and sometimes disastrous) misinterpretations of intention."

How right he is. I've often used a variation of this analogy for programming. What is programming, after all, but speech with a computer? Programming languages like Java and C# are especially good for formal speech, while scripting languages like Perl, Python and Ruby are good at informal speech as well. Almost all of the advances in software can really be thought of as ways of making it easier to talk to our computers. The best languages, IMO, are those that allow for "baby talk" as well as sophisticated formal speech. Larry Wall made this point years ago, in a paper called Natural Language Principles in Perl.

Specialized little languages (Andrew's "IM with my computer") are a particularly interesting subset. Nat wrote about Kevin Lenzo's fabulous purl IRC chatbot the other day. A more recent example is Make's AIM bot, which actually does use IM to issue commands to a program...


tags:   | comments: 11   | Sphere It
submit:

 
Previous  |  Next

0 TrackBacks

TrackBack URL for this entry: http://blogs.oreilly.com/cgi-bin/mt/mt-t.cgi/4609

Comments: 11

  Alexandre Rafalovitch [04.29.06 08:53 AM]

And one must not forget that computer language parsers are often built using context-free (Chomskyan)grammar. And Chomsky is of course the famous linguist who invented the grammar notation to describe English language.

Turned out that it was not flexible enough for either English or programming languages (without extensions anyway), but the common foundation is undeniable.

  Aaron Suggs [04.29.06 11:53 AM]

I unconsciously treat IM windows like the command line: it's my unfortunate habit to type 'exit' in to IM windows with the vain intention of closing the window. My less technical friends think I'm typing gibberish, and my CLI-savvy friends just laugh at me.

D'oh.

  Robert Eckstein [04.29.06 12:42 PM]

It's refreshing to see that the "black box" of modern enterprise servers is finally being split open and componentized using simpler scripting languages, repeating a pattern that we saw in the early 1980s with larger mainframes vs. PC spreadsheets.

  Imran... [04.29.06 03:33 PM]

Hmmm..maybe time for a Yubnub IM bot...bring the social command line to the buddy list?

  Thomas Lord [04.30.06 01:52 AM]

Aw, what the hell. Here's a little rant. Quick and dirty.


I think you and, more especially Lwall's essay are coming at these topics from the wrong angle. Is that thing you are looking at better described as a square? Or as a diamond on it's side?

Bear with me for a few paragraphs, please.

Yes, of course one wants both baby talk and formal expression. Duh.

Is this a linear thing? Is there a line from one to the other? Two end-points of maximal baby-talk and maximal formal expression?

No, of course not. What we are really talking about is the need for specialized dialects, with some having greater expressive power than others. And what we know of computation tells us that there are some maximally expressive dialects into which all other dialects may be translated.

So, there's one baby talk for kids who want to draw pictures by directing a turtle; another for sysadmins who want to generate a report from the contents of /etc/passwd; another baby-talk for Wittgenstein's bricklayers.

And at the opposite end, there's one hyper-formal language for expressing rocket control code; another for expressing relational database transactions; another for expressing mathematical proofs in a machine-verifiable form.

You don't want a language that gives a *spectrum* from baby-talk to formalism. You want a language that gives an *extensible linguistic tree* of related dialects, all reducable to an ur-language.

On the surface this means that you want to maximize syntactic abstraction: programs should be able to define new dialects. Deep down, the core ur-language, you want something very simple (comperable to Turing machines or the axioms of lambda calculus) but complex enough to model the general physical reality of physically realized computations.

Well, that's lisp. I don't specifically mean Common Lisp or Zeta Lisp, or Emacs Lisp or Scheme. I mean the strange attractor that all of those languages orbit around.

Meanwhile, Mr. Business Guy.... you effectively pimp for things like Perl. And here's why you win: it starts from a pretty good "baby-talk" dialect. Lot of good ideas in there. Problem is, it isn't based on any serious attempt at either syntactic abstraction or at getting the ur-language right. Now because it has a transiently handy baby-talk dialect you get a lot of momentum. And with money being thrown around in those directions, you create things like the "AI winter" beating back more serious attempts at language design. And then with all that momentum it's even harder to go back to being more serious.

Language design in practice these days is all a consequence of, pardon me but, people like you confusing power with progress. I keep thinking of a Star Trek TNG episode with that strange species that kidnapped the engineer of Enterprise justifying themselves by explaining "We like things that make us go!."

-t

  Duncan Gough [05.02.06 02:46 AM]

Have a look at GrokItBot:

http://suttree.com/code/GrokItBot/

It's an IM bot with learning and guessing capabilities. When it works it's very cute.

  Erde [07.20.06 05:45 AM]

micq ist really a great thing, didnt know it before...

  CableGuy [10.24.06 12:38 PM]

What about the command line interface of gaim?

  Polizei [07.01.07 09:08 AM]

Lisp or Zeta Lisp . Nice Solution!

  King [07.01.07 09:30 AM]

Perl, Python and Ruby -i am loving all of this.

Post A Comment:

 (please be patient, comments may take awhile to post)






Type the characters you see in the picture above.

RECOMMENDED FOR YOU

RECENT COMMENTS