GNU Guile

GNU Guile
Designed byAubrey Jaffer, Tom Lord, Miles Bader
DeveloperGNU Project
First appeared1993; 26 years ago (1993)[1]
Stable release
2.2.6 / 30 June 2019; 3 months ago (2019-06-30)
Preview release
2.9.3 / 3 August 2019; 2 months ago (2019-08-03)
PlatformIA-32, x86-64
OSLinux, BSD, Windows (through MinGW or Cygwin)
Influenced by
Lisp, Scheme, SCM

GNU Ubiquitous Intelligent Language for Extensions[2] (GNU Guile) is the preferred extension language system for the GNU Project[3] and features an implementation of the programming language Scheme. Its first version was released in 1993.[1] In addition to large parts of Scheme standards, Guile Scheme includes modularized extensions for many different programming tasks.[4][5]

For extending programs, Guile offers libguile which allows the language to be embedded in other programs, and integrated closely through the C language application programming interface (API); similarly, new data types and subroutines defined through the C API can be made available as extensions to Guile.[6]

Guile is used in programs such as GnuCash, LilyPond, GNU Guix, Guix System Distribution (GuixSD), Google's schism .[7]

Guile Scheme

Guile Scheme is a general-purpose, high-level programming language whose flexibility allows expressing concepts in fewer lines of code than would be possible in languages such as C. For example, its hygienic macro system allows adding domain specific syntax-elements without modifying Guile. Guile implements the Scheme standard R5RS, most of R6RS, several Scheme Requests for Implementation (SRFI), and many extensions of its own.

The core idea of Guile Scheme 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."[8] Thus Guile Scheme (and other languages implemented by Guile) can be extended with new data types and subroutines implemented through the C API.

The standard distribution offers modules for Portable Operating System Interface (POSIX) system calls, scheduling, a foreign function interface, S-expression based XML processing through SXML, SXPath, and SXSLT, HTTP and other World Wide Web APIs, delimited continuations, array programming,[9] and other functionality.[4][5] Guile programs can use facilities from SLIB, the portable Scheme library.[10]

Implementation details

When using continuations with call/cc, a requirement of the Scheme standard, Guile copies the execution stack into the heap and back.[11]

Because foreign code may have pointers to Scheme objects, Guile uses the conservative Boehm–Demers–Weiser (BDW) garbage collector.[citation needed]