What's going on with Guile?
Guile maintainer reveals his checklist of immediate plans
November 1, 1998: What's going on with Guile? Guile is a scripting package designed for powerful control of other applications. While not nearly as well recognized as Perl, Python or Tcl, Guile is gaining ground. Cameron and Kathryn deliver the skinny on where it's been and where it's headed. (1,300 words) November 15, 1998: Getting acquainted with Eiffel In this installment, Cameron and Kathryn look into Eiffel's history and familiarize us with ISE Eiffel and GNU Eiffel...Plus a few notables about Scriptics Corp. (1,600 words)
But for more details, we went straight to Jim Blandy, cofounder of Cyclic Software and Guile's current maintainer.
What is it?
Guile (GNU's Ubiquitous Intelligent Language for Extension) is a library that can make any application or utility extensible. That is, Guile implements Scheme (a dialect of LISP) as a scripting language. What this all means is that if your text processor, image manipulator, or aerodynamic modeler lets you control its operation in a LISPish way, it's probably because it has a copy of Guile inside.
Or as Blandy described it, Guile is "an off-the-shelf component that people can use to write extensible programs -- applications that users can customize or use as a foundation for their own applications."
It seems every language promotes its ability to manage other applications -- so what makes Guile different? First, although the standard release also generates a standalone interpreter (like the Perl, Tcl or Python script processors), Guile has stayed true to its "embeddable" roots. It's tuned to provide extensibility to other applications, much like Tcl did initially.
So as Blandy saw it, "Tcl 8.0 gave up Tcl's great strength -- the simplicity of the C/Tcl interface -- so that now, the complexity of the high-performance C interfaces of the two systems seems about the same to me."
Moreover, Guile incorporates several technical features Blandy cited as advantages.
"Perl and Tcl began life simple and elegant -- much more so than Guile," he said. "But in the long run, they're acquiring all the complexity that Guile has, except with implementations crippled by the needs of backward compatibility.
"Both Tcl and Perl use reference counting to decide when they can free something," he cited as an example. "Reference counting is a crummy garbage collection method: it's a pain to keep the references accurate; it doesn't handle cycles; it's slow; and it's not actually any simpler than the real thing.
"Real garbage collection is nice because it allows you to use simpler data structures. It's not just that strings are slow -- Tcl has acquired a ton of new complexity to fix that -- it's that the semantics are wrong. You can't put a pointer to something in a Tcl list; you have to name the thing, and put the name in the list."
Blandy is enthusiastic about coding with Scheme's procedures.
"A Scheme closure is the right thing to use for a callback...it makes callbacks so natural to use that you realize they're actually much more powerful than you thought, and are clean solutions in all kinds of contexts," he said. "It's just the languages we've been using that lead us to consider them kind of annoying."
New kid on the block
If Guile is so great, why haven't you heard more about it? It's young -- Guile 1.0 appeared in the first week of 1997. Although earlier versions had been in experimental use for a while, Guile still has a long way to go to achieve the maturity of Perl, Python, Rexx and Tcl, which were first introduced at the end of the '80s. But Blandy certainly realizes this and has a full schedule of tasks lined up.
"Guile's most serious weakness at the moment is a lack of a manual...I'm going into bugfix and documentation mode," he said. "I'm hoping to have a first edition of that out by January.
"Once that's done, we'll start work on a good package system. We want to integrate dynamic linking smoothly into Guile, so people can distribute Guile modules written in C as easily as modules written in Scheme."
He added that volunteers are working on improved thread support, and the beginnings of an archiving system are coming together. Will this be enough to make up for the head starts of the other languages?
"We're picking up the pace, and I think Guile's design wins make it a better-than-even race...GNOME has chosen Guile as their extension language," Blandy answered cheerfully. "Again, I'm not making predictions. I'm just putting my effort behind a design I think is better."
GNOME (GNU Network Object Model Environment) is an ambitious, high-profile, open source development project often cited as Guile's best advertisement. And GIMP (GNU Image Manipulation Program), sometimes described as "Photoshop for Linux," has already won awards for the functionality it offers users -- functionality that predominantly rests on GIMP's Scheme scriptability. So as developers learn the capabilities a few key applications will help demonstrate, Blandy sees the use of Guile expanding.
"Guile [will] be promoted by applications," he said. Yet he's not concerned with it being all things to all people.
"I don't think anyone has done much serious integration of Guile with Windows," he explained. And this doesn't seem to bother him.
Early in Guile's evolution, its advocates argued that translators from more established scripting languages should be written for Guile. The belief was that anything written in Perl, for instance, would therefore suddenly become useful in a Guile-enabled application.
Lately though, Guile developers have been occupied with more mundane matters like a Windows NT port, optimizations of interactive facilities, and so on. And in regards to language translating, Blandy told us that he would like to push it a little harder.
"But Guile needs some infrastructure first to support that properly," he admitted. "So I am a little reluctant to encourage people to do stuff that will end up connecting to Guile in a kludgey way."
The other obvious contenders for functional universality are the COM definition of the Windows world and Java -- neither one seems of much interest to the Guile crew. Does this mean Guile will be uniquely capable or irrelevantly unique? We won't make any predictions here, but we can report that the Guile folks are certainly enthusiastic about pushing it forward.
It's happened. Scripting has become even bigger than we expected. The toughest part of our job is deciding what not to include in this bi-weekly column. You can help by telling us what kinds of coverage serves you best. Drop us an e-mail anytime.
We apologize for one lapse. For several weeks now, we've been planning a Regular Expressions FAQ. It looks as though it's still a couple of months away. In the meantime, we're concentrating on the interviews and lab testing you've told us you like. Look for the FAQ in early 1999.
Are you still having to answer the same old questions about whether scripted solutions are safe enough for mission-critical applications? We've decided to dedicate a few words once a month to "Scripting in the Real World."
This time, we want to highlight The New South Wales Wholesale State Electricity Market (SEM) and its real-time interchange reports on the Web. According to Market Operations Engineer Geoff Eldridge, the SEM relies on Perl to do much of its work. Among Perl's many advantages on this project is its easy portability between Win*, Unix and OpenVMS. See the pointer in the Resources below for an example of SEM's real-world scripting.
November 15, 1998: Getting acquainted with Eiffel
What have we heard about Eiffel?
It's excellent for prototyping, is highly portable, and has a strong object-oriented (OO) model. It has an integrated development environment (IDE) with class and error navigation, is available in both open source and vended implementations, and has its own remarkable online daily magazine; it's also on the verge of being SWIGable. It has an excellent reputation for its industrial-strength safety, and its creator innovated one of the few "big ideas" in software theory and incorporated it in this language.
Want to know more?
A distinguished heritage
Let's race through Eiffel's history, and see why you might consider it for one of your next projects.
At the center of the Eiffel world is its creator, Dr. Bertrand Meyer, a prominent professor who founded Interactive Software Engineering (ISE) in 1985 to focus on object technology for enterprise development. Meyer's book, Object-Oriented Software Construction, is so well respected that it is frequently the text of choice for classes in C++ or Java. Among its other virtues, OOSC definitively introduces the trademarked Design by Contract (DbC), which is described as the "key to the construction of reliable mission-critical systems."
Design by Contract
Practitioners often think of object-oriented technology as a society of individual objects that know how to work together to accomplish tasks. Traditional "defensive" OO programming regards those objects as untrustworthy actors suspicious of one another. DbC provides technical means -- "preconditions" and "post conditions" -- for precise specification of the responsibilities and expectations of each object, with automatic realization of such designs in executable code. The programs that result surpass DbC-less object-orientation because objects designed by contract concentrate on their true missions. More conventionally designed and implemented objects too often dissipate themselves in checking up on each other.
While Eiffel and the little-known Sather are the only working languages that currently embody DbC, Python might implement it in the future. Eiffel and Python share several characteristics: both have roots in efforts to teach correct OO effectively; they're highly portable, and so on. The Python community is aware of DbC. In fact, several Python insiders are seriously considering proposals to incorporate explicit support of DbC in a future revision of Python. In any case, programmers in all languages can and should style their code according to DbC, even without direct support facilities.
If it swims like a duck, let it into the pool
So what does all of this have to do with scripting? Eiffel's surely no scripting language; it's cumbersome and makes huge binaries. We can compare it to emacs in that as powerful as emacs is as a programming editor, it's not often used by system administrators who just want to launch a simple editing session on a new machine in less than three minutes. However scalable and reliable Eiffel is for rocket science, its "Hello World" overhead is unbearable for the small processes we typically script.
Well, these were the prejudices we held until Geoff Eldridge updated us. Eldridge, market operations engineer for the New South Wales State Electricity Market, publishes Eiffel Liberty, a newsletter on the Eiffel world, scripting, and open source software.
The passion Eldridge admits for the language is evident in his presentation of Eiffel's virtues. He showed us not only that it was time to give the ISE Eiffel compilers another look, but that the new GNU Eiffel compiler is a good complement to them for certain styles of development.
ISE's compilers and class libraries have always been available for a wide variety of platforms at a modest price. Eiffel certainly makes the good "glue" we expect of our scripting languages. Meyer has emphasized the importance of "providing clear and clean communication paths with the non-O-O world, in particular the C world." The difference, from an Eiffel perspective, is this: scripting languages make good glue with their toolboxes of expressive libraries. Eiffel does all that, and, because of its uniform object-oriented semantics, its toolbox is inherently extensible. See the links that appear in the Resources section below for examples.
But what about the "weight" of the ISE Eiffel compiler? First, ISE's EiffelBench IDE and EiffelCase software engineering workbench offer an integrated environment to accelerate Eiffel development cycles. Object Tools GmbH's Visual Eiffel and the freely available GNU Eiffel are other alternatives.
As Eldridge describes, the GNU Eiffel implementers "use a novel approach to type inference, and the resulting development times have brought GNU Eiffel into the realms of dynamic scripting languages with the added benefit of highly optimized binaries...[The executable of] my Hello World program comes in at seven kilobytes and takes a matter of seconds to compile." The compiler itself is about 50,000 lines of open source Eiffel code, portable to any platform with an ANSI C compiler.
Eldridge says he's "put together a nice Win32 distribution for GNU Eiffel which I've called elj-win32" to bring open source Eiffel to the Microsoft computing world. This includes Steven White's SmallEiffel Editor (SEEd), a polished IDE, as well as two Win32 graphical user interface (GUI) libraries, among other elements.
Deciding on Eiffel
Eiffel has always been syntactically elegant and semantically powerful. Meyer's books are acknowledged classics of software engineering. ISE's training and customer support services have good reputations. Eiffel has been used in several noteworthy, high-profile projects; the ISE Web site, for example, discusses how Hewlett-Packard used ISE Eiffel to develop leading-edge printer software in weeks instead of months.
Not everything is rosy, of course. While ISE has released incredible riches as an open source data structure library, several of the interfaces traditionally handy in scripting -- regular expression, socket, and threading -- are still not widely available. Loryn Jenkins, business analyst for Hypercom Net Transactions, says "that Eiffel has typically attracted perfectionists who critique the solutions provided in an academic sense, but who don't roll up their sleeves and get down and dirty in the code."
Although Eiffel's origins are far from those of Perl and the other languages we usually cover, it has the strength and flexibility to adopt the best principles from the scripting world. Jenkins offers this assurance:
"The formation of the Eiffel Forum has inspired more sharing of source code than ever before, and has assisted in inspiring developers to produce more Eiffel code. They have an incentive to do so -- peer recognition.) Also, efforts from Dominique Colnet (SmallEiffel compiler), Steven White (SEEd), Eric Bezault (GOBO), Franck Arnaud (Pylon, Fenestra), Patrick Doyle (eSQL, Dynamic Linking in SmallEiffel prototype), and Richie Bielak (GTK interface) are beginning to alter Eiffel's ['ivory-tower'] tendencies.
Just as this column appeared, in fact, Bielak announced release of his Emu 0.1, a Web server coded in Eiffel.
A final point readers need to know about Eiffel is that Meyer himself neither endorses nor deprecates the GNU Eiffel project. While he has publicly applauded several of its achievements, and was generous with his own time during the preparation of this column, his concern that the column would too closely link GNU Eiffel with his own company led him to ask that he not be quoted here.
You want to deliver reliable finished applications faster. It's a good time to give Eiffel's radical emphasis on quality through rapid development another look. Your own specific situation as a system administrator, lead designer, student, or other role will determine whether the ISE compiler, the GNU compiler, or both, is right for you.
We applaud Scriptics Corporation. Chartered as a for-profit corporation, it has managed in its first half-year not only to satisfy a demanding cadre of investors, but also to open up Tcl's development process. Scriptics' Web site includes access through CVS (concurrent versions system) to the latest sources, and an increasingly responsive fault-report ("bug-tracking") mechanism. The last month has brought an explicit, published roadmap of the prospects for Scriptics' products, both the open source and vended ones. Scriptics has already met the first of its deadlines with release of its ScriptPro 1.1 beta for Linux and SGI just last week. While older and larger corporations act as though such roadmaps are mere marketing devices, Scriptics' engineers demonstrate their professionalism by setting their goals in public -- and hitting them. Congratulations to John Ousterhout, who, like Bertrand Meyer, is constructing a lively counterexample to the argument that academics can't succeed in business.
Other release news: Python 1.5.2 will probably appear for general distribution before December. Last month's MetaCard 2.2 adds support for MacOS and Windows 98, new image formats, and several other benefits. The ANSI X3J18 Standards Committee for Rexx was just meeting in Dallas as we published this column. We'll cover their work later.
About the author
If you have technical problems with this magazine, contact
Cameron Laird and Kathryn Soraiz manage their own software consultancy, Network Engineered Solutions, from just outside Houston, TX. Reach Cameron at email@example.com. Reach Kathryn at firstname.lastname@example.org.
About the author
If you have technical problems with this magazine, contact email@example.com