Difference between revisions of "GNU/guile"

From LibrePlanet
< GNU
Jump to: navigation, search
m (Guile is an extension language platform)
(added Gentoo)
 
(7 intermediate revisions by one other user not shown)
Line 2: Line 2:
  
 
[https://gnu.org/s/guile [[Image:Guile-banner.small.png‎]]]
 
[https://gnu.org/s/guile [[Image:Guile-banner.small.png‎]]]
 
== Guile is an extension language platform ==
 
The common understanding of an extension language is a language designed to be used from within another program.
 
 
For GNU operating system and most of projects, it is a language embeddable in C/C++ program.
 
 
A language for the purpose often has proper API to interact with C/C++, and compatible stack operation to C/C++.
 
 
One of the principle of GNU design philosophy,
 
  
 
== Guile, The GNU extension language ==
 
== Guile, The GNU extension language ==
Line 25: Line 16:
  
 
Guile is an efficient virtual machine that executes a portable instruction set generated by its optimizing compiler, and integrates very easily with C and C++ application code. In addition to Scheme, Guile includes compiler front-ends for ECMAScript and Emacs Lisp (support for Lua is underway), which means your application can be extended in the language (or languages) most appropriate for your user base. And Guile's tools for parsing and compiling are exposed as part of its standard module set, so support for additional languages can be added without writing a single line of C.
 
Guile is an efficient virtual machine that executes a portable instruction set generated by its optimizing compiler, and integrates very easily with C and C++ application code. In addition to Scheme, Guile includes compiler front-ends for ECMAScript and Emacs Lisp (support for Lua is underway), which means your application can be extended in the language (or languages) most appropriate for your user base. And Guile's tools for parsing and compiling are exposed as part of its standard module set, so support for additional languages can be added without writing a single line of C.
 +
 +
=== Guile gives your programs more power ===
 +
 +
Using Guile with your program makes it more usable. Users don't need to learn the plumbing of your application to customize it; they just need to understand Guile, and the access you've provided. They can easily trade and share features by downloading and creating scripts, instead of trading complex patches and recompiling their applications. They don't need to coordinate with you or anyone else. Using Guile, your application has a full-featured scripting language right from the beginning, so you can focus on the novel and attention-getting parts of your application.
 +
 +
== How to install Guile ==
 +
Under openSUSE/Linux or SLE(SUSE Linux Enterprise) you may try:
 +
sudo zypper in guile
 +
 +
For debian/Hurd, try:
 +
sudo apt-get install guile-2.0
 +
 +
For Gentoo, try:
 +
sudo emerge =dev-scheme/guile-2*
 +
 +
You may build the latest Guile release from src anyway:
 +
http://www.gnu.org/software/guile/download.html#releases
 +
 +
Guile requires the following external packages:
 +
 +
  - GNU MP, at least version 4.2
 +
    GNU MP is used for bignum arithmetic.  It is available from
 +
    http://gmplib.org/ .
 +
 +
  - libltdl from GNU Libtool, at least version 1.5.6
 +
    libltdl is used for loading extensions at run-time.  It is
 +
    available from http://www.gnu.org/software/libtool/ .
 +
 +
  - GNU libunistring, at least version 0.9.3
 +
    libunistring is used for Unicode string operations, such as the
 +
    `utf*->string' procedures.  It is available from
 +
    http://www.gnu.org/software/libunistring/ .
 +
 +
  - libgc, at least version 7.0
 +
    libgc (aka. the Boehm-Demers-Weiser garbage collector) is the
 +
    conservative garbage collector used by Guile.  It is available
 +
    from http://www.hpl.hp.com/personal/Hans_Boehm/gc/ .
 +
 +
  - libffi
 +
    libffi provides a "foreign function interface", used by the
 +
    `(system foreign)' module.  It is available from
 +
    http://sourceware.org/libffi/ .
 +
 +
  - pkg-config
 +
    Guile's ./configure script uses pkg-config to discover the correct
 +
    compile and link options for libgc and libffi.  For this to work,
 +
    the `PKG_CONFIG_PATH' environment variable must be set to point to
 +
    the places where libgc's and libffi's `.pc' files can be found:
 +
 +
      PKG_CONFIG_PATH=/path/to/libgc/lib/pkgconfig:/path/to/libffi/lib/pkgconfig
 +
 +
Alternatively, when pkg-config is not installed, you can work around
 +
this by setting some variables as part of the configure
 +
command-line:
 +
 +
    - PKG_CONFIG=true
 +
 +
    - BDW_GC_CFLAGS=<compile flags for picking up libgc headers>
 +
 +
    - BDW_GC_LIBS=<linker flags for picking up the libgc library>
 +
 +
Note that because you're bypassing all pkg-config checks, you will
 +
also have to specify libffi flags as well:
 +
 +
    - LIBFFI_CFLAGS=<compile flags for picking up libffi headers>
 +
 +
    - LIBFFI_LIBS=<linker flags for picking up the libffi library>

Latest revision as of 05:22, 30 August 2013

Button-gnuhead.png This is an official GNU package.

Guile-banner.small.png

Guile, The GNU extension language

Guile is the GNU Ubiquitous Intelligent Language for Extensions, the official extension language for the GNU operating system.

Guile is a library designed to help programmers create flexible applications. Using Guile in an application allows the application's functionality to be extended by users or other programmers with plug-ins, modules, or scripts. Guile provides what might be described as "practical software freedom," making it possible for users to customize an application to meet their needs without digging into the application's internals.

Guile is a programming language

Guile is an interpreter and compiler for the Scheme programming language, a clean and elegant dialect of Lisp. Guile is up to date with recent Scheme standards, supporting the Revised5 and most of the Revised6 language reports (including hygienic macros), as well as many SRFIs. It also comes with a library of modules that offer additional features, like an HTTP server and client, XML parsing, and object-oriented programming.

Guile is an extension language platform

Guile is an efficient virtual machine that executes a portable instruction set generated by its optimizing compiler, and integrates very easily with C and C++ application code. In addition to Scheme, Guile includes compiler front-ends for ECMAScript and Emacs Lisp (support for Lua is underway), which means your application can be extended in the language (or languages) most appropriate for your user base. And Guile's tools for parsing and compiling are exposed as part of its standard module set, so support for additional languages can be added without writing a single line of C.

Guile gives your programs more power

Using Guile with your program makes it more usable. Users don't need to learn the plumbing of your application to customize it; they just need to understand Guile, and the access you've provided. They can easily trade and share features by downloading and creating scripts, instead of trading complex patches and recompiling their applications. They don't need to coordinate with you or anyone else. Using Guile, your application has a full-featured scripting language right from the beginning, so you can focus on the novel and attention-getting parts of your application.

How to install Guile

Under openSUSE/Linux or SLE(SUSE Linux Enterprise) you may try:

sudo zypper in guile

For debian/Hurd, try:

sudo apt-get install guile-2.0

For Gentoo, try:

sudo emerge =dev-scheme/guile-2*

You may build the latest Guile release from src anyway:

http://www.gnu.org/software/guile/download.html#releases 

Guile requires the following external packages:

 - GNU MP, at least version 4.2
   GNU MP is used for bignum arithmetic.  It is available from
   http://gmplib.org/ .
 - libltdl from GNU Libtool, at least version 1.5.6
   libltdl is used for loading extensions at run-time.  It is
   available from http://www.gnu.org/software/libtool/ .
 - GNU libunistring, at least version 0.9.3
   libunistring is used for Unicode string operations, such as the
   `utf*->string' procedures.  It is available from
   http://www.gnu.org/software/libunistring/ .
 - libgc, at least version 7.0
   libgc (aka. the Boehm-Demers-Weiser garbage collector) is the
   conservative garbage collector used by Guile.  It is available
   from http://www.hpl.hp.com/personal/Hans_Boehm/gc/ .
 - libffi
   libffi provides a "foreign function interface", used by the
   `(system foreign)' module.  It is available from
   http://sourceware.org/libffi/ .
 - pkg-config
   Guile's ./configure script uses pkg-config to discover the correct
   compile and link options for libgc and libffi.  For this to work,
   the `PKG_CONFIG_PATH' environment variable must be set to point to
   the places where libgc's and libffi's `.pc' files can be found:
     PKG_CONFIG_PATH=/path/to/libgc/lib/pkgconfig:/path/to/libffi/lib/pkgconfig

Alternatively, when pkg-config is not installed, you can work around this by setting some variables as part of the configure command-line:

   - PKG_CONFIG=true
   - BDW_GC_CFLAGS=<compile flags for picking up libgc headers>
   - BDW_GC_LIBS=<linker flags for picking up the libgc library>

Note that because you're bypassing all pkg-config checks, you will also have to specify libffi flags as well:

   - LIBFFI_CFLAGS=<compile flags for picking up libffi headers>
   - LIBFFI_LIBS=<linker flags for picking up the libffi library>