GNU Guile
| Developer(s) | GNU Project |
|---|---|
| Stable release | 2.0.7 (November 30, 2012[1]) [±] |
| Operating system | GNU, GNU/Linux |
| Type | Programming language |
| License | GNU Lesser General Public License |
| Website | Official website |
| Standard(s) | R5RS |
GNU Guile is an interpreter/virtual machine for the Scheme programming language. It was first released in 1993.[2] Guile includes modularized extensions for POSIX system calls, APL array functionality, and others packaged as an object[3] library. "Libguile" allows the language to be embedded in other programs, and used as an interface for other languages which allow close integration.[4]
Guile stands for the GNU Ubiquitous Intelligent Language for Extensions, and is the official extension language of the GNU Project,[5] although, as of 2006, it has been used for only a handful of major projects. Its name was coined in a Usenet discussion by Lee Thomas.[6] The idea is that "the developer implements critical algorithms and data structures in C or C++ and exports the functions and types for use by interpreted code. The application becomes a library of primitives orchestrated by the interpreter, combining the efficiency of compiled code with the flexibility of interpretation."[7]
Contents |
Implementation compromises [edit]
The close interaction between Guile and the application comes at a cost. Scheme requires implementations to optimize tail recursion because of Scheme's heavy use of recursion, but most techniques interfere with interoperation; Guile compromises by optimizing tail calls within purely Scheme functions and programs, but not when foreign functions enter the picture.[8] Implementation of call/cc, another requirement of the Scheme standard, is not entirely satisfactory — to handle continuations in this environment it must copy the entire execution stack into the heap, and back.[9] Because foreign code may have pointers to Scheme objects, Guile's garbage collector is the "conservative" variety which must periodically touch all of allocated memory.[10]
History [edit]
Guile had its origin in a heated discussion (later dubbed "the Tcl Wars") started by Richard Stallman, who stated that Tcl was underpowered for application scripting; he proposed Scheme as the preferred language for extending GNU applications and eventually launched the Guile project.[11] Because an appropriate Scheme interpreter did not exist at that time, Guile was developed to fill the niche. Tom Lord (later the developer of GNU arch) was heavily involved in the development of Guile while employed by Cygnus Solutions (later acquired by Red Hat). Its earlier versions were forked from SIOD ("Scheme In One Day"[12]) and the SCM interpreter,[13] before 1995.[14] After its initial release, development languished for many years, but 2009-10 saw major performance improvements.[15]
One of the goals of Guile is to allow other languages to be translated into Scheme and thence into portable byte-code; thus Guile would effectively be a language-neutral runtime environment. This goal has not been fulfilled yet, though various attempts have been made: a dialect of Scheme essentially differing only in its C-like syntax; a translation of Emacs Lisp; a Tcl converter motivated by tkWWW; and something roughly resembling the Logo programming language.[16]
Guile Scheme supports XML, XPath, and XSLT in the forms of SXML, SXPath and SXSLT, respectively. The S-expression-based XML processing is provided by guile-lib.
Guile programs can use facilities from SLIB, the portable Scheme library.
Programs using Guile [edit]
- AisleRiot - part of the GNOME Games package.[17]
- BoBot++ - an Internet Relay Chat bot extensible in Guile Scheme.[18]
- GNUbik
- AutoGen
- gEDA
- GNU Anubis
- GnuCash
- Denemo
- GNU LilyPond
- GNU MDK
- GNU Robots
- GNU Serveez
- GNU TeXmacs
- GnoTime[19]
- Liquid War 6
- mcron — a backwards compatible replacement for Vixie cron written in Guile.[20]
- OpenCog[21]
- Scwm
- Skribilo
- Snd (software)
- tkWWW — defunct web browser; was a Free GNU browser written & extensible in Tk
- WeeChat — since version 0.3.7.[22]
References [edit]
- ^ Courtès, Ludovic (2012-11-30). "GNU Guile 2.0.7 released". info-gnu. http://lists.gnu.org/archive/html/info-gnu/2012-11/msg00011.html. Retrieved 2012-12-03.
- ^ Blandy 1997, p. 102.
- ^ "Strictly speaking, Guile is an object library, not an executable." Blandy 1997, p. 89.
- ^ "To encourage customization, Guile provides extensive interfaces, allowing C code to interact with the Scheme world. C code can freely create, access, and mutate Scheme objects; C functions may call Scheme functions and vice versa; C code may add new types to the Scheme world and take advantage of Guile's garbage collection… Most of the standard Scheme procedures are implemented by C functions, visible to Guile clients; for example, applications can call the C function
scm_cons, which is the underlying implementation of the Scheme procedurescons." Blandy 1997, pp. 94, 96. - ^ "GNU Guile (About Guile)". GNU Project. "Guile is the GNU Ubiquitous Intelligent Language for Extensions, the official extension language for the GNU operating system."
- ^ "The name Guile was first suggested in a Usenet discussion by Lee Thomas." Guile Scheme 1995.
- ^ Blandy 1997, p. 87.
- ^ Blandy 1997, p. 99.
- ^ "Because Guile allows foreign functions and Scheme functions to call each other freely, a Guile continuation may include both C and Scheme stack frames. For simplicity, Guile's implementation of
call/cccopies the entire C stack into the heap; invoking a continuation copies the stack back from the heap and uses thelongjmpfunction to reactivate it. This implementation has a number of drawbacks…", Blandy 1997, p. 99. - ^ Blandy 1997, pp. 99–100.
- ^ Vanderburg, Glenn. "The Tcl War".
- ^ Carrette, George J. (1996). "SIOD: Scheme in One Defun". The Internet Scheme Repository.
- ^ "It's hard to determine just who designed Guile. A large share of the credit surely belongs to Aubrey Jaffer whose excellent Scheme interpreter, SCM, forms the core of the implementation. The module system was designed and built by Miles Bader…" "An Anatomy of Guile, The Interface to Tcl/Tk", 1995
- ^ "Here is a very, very brief history of this interpreter. I hope that people involved in its past will contribute more to this document. SIOD: George Carrette wrote SIOD, the earliest version. Although most of this code as been rewritten or replaced over time, the garbage collector from SIOD is still an important part of Guile. SIOD is still actively developed and freely available. It has a very small footprint." Guile Scheme 1995.
- ^ Wingo, Andy. "Older blog entries for wingo (starting at number 328)". Advogato.
- ^ Lord, Thomas (July 1995). "An Anatomy of Guile The Interface to Tcl/Tk" (PostScript). Third Annual Tcl/Tk Workshop. Toronto, Ontario, Canada: Usenix. Retrieved 23 November 2010.
- ^ "Aisleriot". GNOME Live!. "The rules for the games have been coded for your pleasure in the GNOME scripting language (Scheme)."
- ^ "Bobot++ -- A Flexible IRC Bot".
- ^ "GnoTime - The Gnome Time Tracker".
- ^ "Mcron". GNU Project. "It is written in pure Guile, and allows configuration files to be written in scheme (as well as Vixie's original format) for infinite flexibility in specifying when jobs should be run."
- ^ "OpenCog Foundation".
- ^ "Version 0.3.7 - WeeChat dev news".
- "Guile Scheme". December 1995; specification and history; FSF.
- "An Anatomy of Guile, The Interface to Tcl/Tk" (1995)
- Jim Blandy, "Guile: An Interpreter Core for Complete Applications", Handbook of Programming Languages, Volume IV: Functional and Logic Programming Languages, ed. Peter H. Salus. 1998 (1st edition), Macmillian Technical Publishing; ISBN 1-57870-011-6, pp. 87–104.
External links [edit]
- Source code on the GNU Savannah software forge.
- What Is Guile?
- Archives of the Tcl Wars
- "A brief history of guile" (from the Guile manual)
- A 2003 interview with GNU Guile maintainer Marius Vollmer
|
|||||||||||||||||||