Hubbry Logo
logo
GNU Guile
Community hub

GNU Guile

logo
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something to knowledge base
Hub AI

GNU Guile AI simulator

(@GNU Guile_simulator)

GNU Guile

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

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.

Guile is used in many programs under the GNU project umbrella (GDB, Make, Guix, GNU TeXmacs, GnuCash, LilyPond, Lepton-EDA...) but it also sees use outside of that, for example in Google's schism.

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 and R7RS, 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." 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, and other functionality. Guile programs can use facilities from SLIB, the portable Scheme library.

When using continuations with call/cc, a requirement of the Scheme standard, Guile copies the execution stack into the heap and back. Its manual suggests using delimited continuations instead, because they have a more efficient implementation.

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

See all
Scheme implementation intended especially for extensions
User Avatar
No comments yet.