[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Introduction

Guile (which can stand for GNU Ubiquitous Intelligent Language Extension) is the GNU extension language. It started out as an embeddable Scheme interpreter, and has rapidly evolved into a kitchen-sink package including a standalone Scheme interpreter, an embeddable Scheme interpreter, several graphics options, other languages that can be used along with Scheme (for now just ctax and Tcl), and hooks for much more.

2.1 What are scripting and extension languages  
2.2 History of Guile and its motivations  
2.3 How to characterize Guile  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 What are scripting and extension languages

A scripting language is a programming language which serves as glue between other system programs. In the UNIX world, the traditional scripting language is the Bourne shell, which allows many UNIX commands to be executed in sequence, or in a pipeline. Traditional UNIX commands are cleverly written to work well when put together in a script.

Other examples of UNIX scripting languages are AWK, Perl, Scsh (the Scheme Shell: a Scheme interpreter enhanced to do good scripting), Python, Tcl, Java ...

UNIX programmers noticed, more than 25 years ago, that scripting languages can do serious work, so the Bourne shell was written to have variables, operators and control structures, just like a full-featured programming language.

What scripting languages have, that traditional programming languages do not, is the ability to easily run an external program (or a pipeline of external programs) and use the returned values and output from that program in useful ways.

An extension language is a programming language interpreter offered by an application program, so that users can write macros or even full-fledged programs to extend the original application. Extension languages have a C interface (it is usually C, but it could be any other compiled language), and can be given access to the C data structures. Likewise, there are C routines to access the extension language data structures.

Extension languages abound in the software world, even though the name extension language is seldom used. Examples are:

One lesson we can learn from looking at classical large software applications is that "writers of large programs" always end up throwing in some kind of parser for configuration or scripting.

Of the examples listed above, Emacs Lisp, Tcl, Libscheme and Guile have an important property: they are not added as an afterthought for a specific application. They are general-purpose languages which a user can learn (even in college courses) and then use to customize the application program.

This is a recent and (in my opinion) very exciting direction in large-program software engineering: program designers can link in the Guile or Tcl library from the very beginning, and tell their users "You want to customize this program? Just use Scheme (or Tcl, or whatever language), which you already know!"


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2 History of Guile and its motivations

A few separate threads of events led to the development of Guile.

In the fall of 1994, Richard Stallman, director of the GNU project, posted an article with the subject "Why you should not use Tcl", in which he argued that Tcl is inadequate as an extension language. This generated a flurry of flames (available in the hypermail archive (http://www.vanderburg.org/Tcl/war/) The Tcl War).

The result was that Stallman then proposed his design for the GNU Extension Language, first called GEL and then renamed Guile. The discussion triggered by that article is also available in a hypermail archive, http://www.vanderburg.org/Tcl/war2/.

One interesting feature of this GNU Extension Language plan was that users should have a choice of languages to use in extending their program. The basic language would be a slightly modified Scheme, and translators would be written to convert other languages (like Tcl, Python, Perl, C-like languages ...) into Scheme.

Tom Lord started working on this project immediately, taking Aubrey Jaffer's small and portable implementation of Scheme, SCM, and making it into an embeddable interpreter: callable from C and allowing new Scheme procedures to be written in C.

In the spring of 1995, the guile-ii snapshot was released. This made it possible to start writing code in C and Scheme using the guile facilities.

The guile-iii snapshot was released the summer of 1995, and it had fixed enough problems so that the access to Scheme data structures from C was almost complete.

After this, Cygnus Support added many features to Guile and finished implementing others, so that Guile acquired thread support, a regular expression matcher, a Tk interface, an interface to the SGI OpenGL graphics system, an applet formalism, and some other packages. This was all in the Cygnus Guile r0.3 and r0.4 releases.

Meanwhile, Tom Lord left the project after having produced a divergent version of Guile: 1.0b2. The Free Software Foundation hired Jim Blandy to coordinate Guile development. The FSF released its first version of Guile in January 1997. In the future, many of the Cygnus packages will be re-integrated into Guile.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3 How to characterize Guile

I have already mentioned that Guile has become a kitchen sink package; here you can see how Guile freely takes new commands and constructs from the portable Scheme library slib, the Tk widget set, a posix library (useful for UNIX systems programming), the regular expression library rx, and many more ...

So Guile has many more primitive procedures available to it than those specified in section `Standard Procedures' in Revised(5) Report on the Algorithmic Language Scheme. On top of that, Guile will interpret almost all standard Scheme programs. The only incompatible difference between the basic Guile language and R5RS Scheme is that Guile is case sensitive, whereas R5RS is case insensitive. We hope that few people have written Scheme programs that depend on case insensitivity.

Here is a possible view of the sum of the parts in Guile:
 
guile   =       standard Scheme (R5RS)
        PLUS    extensions to R5RS offered by SCM
        PLUS    some extra primitives offered by Guile (catch/throw)
        PLUS    portable Scheme library (SLIB)
        PLUS    embeddable Scheme interpreter library (libguile)
        PLUS    Tk toolkit
        PLUS    threads
        PLUS    Posix library
        PLUS    Regular expression library (rx)
        PLUS    Tcl library


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Ingo Ruhnke on September, 12 2002 using texi2html