guile
Execute Scheme code
TLDR
Start a REPL (interactive shell)
Execute the script in a given Scheme file
Execute a Scheme expression
Listen on a port or a Unix domain socket (the default is port 37146) for remote REPL connections
SYNOPSIS
guile [options] [script-file | -e expression | -c command]
PARAMETERS
-?
Display help message and exit.
--help
Display help message and exit.
-V
Display version information and exit.
--version
Display version information and exit.
-L path
Add path to the module load path.
--load-path=path
Add path to the module load path.
-e expression
Evaluate the given Scheme expression.
--eval=expression
Evaluate the given Scheme expression.
-c command
Execute the given Scheme command.
--compile=command
Execute the given Scheme command.
-s script-file
Execute Scheme script-file.
--script=script-file
Execute Scheme script-file.
--debug
Enable debugging mode.
--no-auto-compile
Disable automatic compilation of Scheme code.
DESCRIPTION
Guile is the GNU project's preferred extension language. It's an interpreter that implements the Scheme programming language. It's designed to be embedded in other programs, offering a powerful and flexible way to add scripting capabilities. Guile can be used interactively to evaluate Scheme expressions or to execute Scheme scripts.
Beyond serving as an extension language, Guile can also be used for general-purpose programming. It supports various features like modules, macros, dynamic linking, and multiple threads, making it a versatile tool for diverse programming tasks. Guile provides a rich set of libraries and functions for tasks such as string manipulation, file I/O, networking, and process management. Its flexible design and tight integration with the GNU ecosystem make it a valuable asset for developers.
INTERACTIVE MODE
If no script file, expression, or command is specified, Guile will enter an interactive REPL (Read-Eval-Print Loop) mode, allowing you to enter and evaluate Scheme code directly.
ERROR HANDLING
Guile provides robust error handling capabilities. When an error occurs, it displays detailed information about the error, including the file name, line number, and error message.
MODULES
Guile's module system allows you to organize code into reusable components. You can load modules using the (use-modules ...)
form.
HISTORY
Guile's development began in the late 1990s as a scripting language for the GNU project. The primary motivation was to provide a powerful and flexible language that could be easily embedded into other applications, allowing them to be extended and customized. Over the years, Guile has matured into a robust and widely used language, finding applications in various domains, from system administration to scientific computing. Its strong integration with the GNU ecosystem and its adherence to Scheme standards have contributed to its continued relevance.
SEE ALSO
gdb(1)