词条 | GNU Guile |
释义 |
| name = GNU Guile | logo = GNU-Guile-logo.svg | logo caption = GNU Guile new design logo | screenshot = | screenshot caption = | paradigm = | family = Lisp | designer = Aubrey Jaffer, Tom Lord, Miles Bader | developer = GNU Project | released = {{Start date and age|1993}}[1] | latest release version = 2.2.4 | latest release date = {{Start date and age|2018|07|01|df=yes}} | latest preview version = 2.9.1 | latest preview date = {{Start date and age|2018|10|10|df=yes}} | typing = | scope = | programming language = | platform = IA-32, x86-64 | operating system = Linux, BSD, Windows (through MinGW or Cygwin) | license = GPL | file ext = .scm .go (Guile object) | file format = | website = {{URL|gnu.org/software/guile}} | implementations = | dialects = | influenced by = Lisp, Scheme, SCM | influenced = }}GNU Ubiquitous Intelligent Language for Extensions[2] (GNU Guile) is the preferred extension language system for the GNU Project, which 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.[5][6] 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.[7] Guile is used in programs such as GnuCash, LilyPond, GNU Guix, Guix System Distribution (GuixSD), and GNU Debugger.[8] Guile SchemeGuile 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."[2] 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,[10] and other functionality.[5][6] Guile programs can use facilities from SLIB, the portable Scheme library.[13] Implementation detailsWhen using continuations with call/cc, a requirement of the Scheme standard, Guile copies the execution stack into the heap and back.[14] Because foreign code may have pointers to Scheme objects, Guile uses the conservative Boehm–Demers–Weiser (BDW) garbage collector.{{Citation needed|date=December 2016}} HistoryThe Guile manual gives details of the inception and early history of the language.[15] A brief summary follows: After the success of Emacs in the free software community, as a highly extensible and customizable application via its extension (and partly implementation) language Emacs Lisp, the community began to consider how this design strategy could apply to the rest of the GNU system. Tom Lord initially began work on an embeddable language runtime named the GNU Extension Language (GEL), which was based on Aubrey Jaffer's Scheme implementation SCM (which in turn was based on George Carrette's SIOD).[16][17] Lord convinced Richard Stallman to make GEL the official extension language of the GNU project, based on the argument that Scheme was a cleaner Lisp dialect than Emacs Lisp, and that GEL could evolve to implement other languages on the same runtime, namely Emacs Lisp. After Lord discovered GEL had a naming conflict with another programming language, he solicited suggestions for a new name. From several contributions in several Usenet newsgroups, Lord controversially chose Guile from a suggestion by Lee Thomas.[18][19][20][21] During the development of Guile (then GEL) and before its public release, the extension language Tcl was gaining popularity and being pushed as a universal extension language. Stallman saw Tcl as being underpowered as an extension language, and posted a criticism to the comp.lang.tcl newsgroup, which initiated a flamewar known as the "Tcl War".[3] Since the public announcement of the Guile project coincided with the Tcl debate, it has become a common misconception that Guile began as a reaction to this. After the initial release of Guile, development languished for many years, but 2009–2010 saw major improvements,[23] and Guile 2.0 was released in 2011 with a new compiler infrastructure, a virtual machine implementation, a switch to the Boehm–Demers–Weiser garbage collector, many improvements to the Guile Scheme language, and other major changes.[24] One of the goals of Guile is to allow other languages to be used alongside Scheme, such that Guile would effectively be a language-neutral runtime environment. Various attempts at this have been made in past versions: 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 language Logo.[25] With version 2.0, the project successfully transitioned to a compiler tower approach, allowing the definition of compilers from one language to another, typically from a higher-level one to a lower-level intermediate representation, and eventually virtual machine bytecode or native machine code.[26][27] {{Lisp}}Emacs integrationThere have been several past unfinished attempts to replace or supplement Emacs's Emacs Lisp (Elisp) extension language with Guile, parallel to the efforts of supporting other languages in Guile.{{Citation needed|date=December 2016}} With version 2.0 of Guile, a new attempt at implementing Elisp on the Guile compiler tower and replacing Emacs's Elisp implementation with that of libguile has begun and made significant progress through Google Summer of Code projects.[28] A Guile-based Emacs could offer better execution performance for Emacs Lisp, support new Emacs Lisp language features more easily, make Guile libraries written in other programming languages available to Emacs Lisp code, and allow writing Emacs extensions in other programming languages supported by Guile, all while remaining fully backward compatible with existing Emacs Lisp code bases. {{As of|2014|10}}, the implementation had reached a stage where Guile Emacs is able to reliably run most Emacs Lisp code. Remaining problems or possible problems involve the different internal representation of Emacs Lisp strings from Scheme strings, the difference between how Emacs Lisp and Scheme treat the Boolean false and empty list objects, Emacs Lisp macros not integrating with Scheme, Emacs Lisp not having been designed for concurrency, and the portability of Guile to platforms supported by Emacs. Other concerns raised by the Emacs community include the relative sizes of the Emacs and Guile communities, and whether it would cause splitting in the community if Emacs were extensible in programming languages other than Emacs Lisp.[4]References1. ^1 Blandy 1997, p. 102. [5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25]2. ^Blandy 1997, p. 87. 3. ^Archives of the Tcl War 4. ^{{cite web|url=https://lwn.net/Articles/615220/|title=The future of Emacs, Guile, and Emacs Lisp}} 5. ^1 2 {{cite web|url=https://www.gnu.org/software/guile/manual/html_node/API-Reference.html|title=Guile Manual, API Reference|publisher=GNU Project}} 6. ^1 2 {{cite web|url=https://www.gnu.org/software/guile/manual/html_node/Guile-Modules.html|title=Guile Manual, Guile Modules|publisher=GNU Project}} 7. ^1 "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 procedures cons ." Blandy 1997, pp. 94, 96.8. ^1 {{cite web|url=https://www.gnu.org/software/guile/|title=GNU Guile (About Guile)|publisher=GNU Project|quote=Guile is the GNU Ubiquitous Intelligent Language for Extensions, the official extension language for the GNU operating system.}} 9. ^1 {{cite web |url=https://www.gnu.org/software/guile/#apps-using-guile |title=Applications using Guile |publisher=GNU Project |deadurl=no |archiveurl=https://web.archive.org/web/20171124105500/https://www.gnu.org/software/guile/#apps-using-guile |archivedate=2017-11-24 |df= }} 10. ^1 "The name Guile was first suggested in a Usenet discussion by Lee Thomas." Guile Scheme 1995. 11. ^1 {{cite web|url=https://groups.google.com/forum/#!search/%22Integrated$20Measurement$20Systems%22$2BGUILE/gnu.misc.discuss/0VtEf1fgEJk/IMBs2o-ftrgJ|title=The Name of the Rose}} 12. ^1 {{cite web|url=https://groups.google.com/forum/#!search/%22Integrated$20Measurement$20Systems%22$2BGUILE/gnu.misc.discuss/9pD9yVoRYFw/0z7SLYbx8loJ|title=GUILE - two more reasons to prefer it}} 13. ^1 {{cite web|url=https://groups.google.com/forum/#!msg/comp.lang.scheme/X5GrLVAvGLU/Xk11xCrbzCcJ;context-place=msg/comp.lang.scheme/pa8qtbJHFgA/PsscMKOkvRcJ|title=GEL:Important Name Change}} 14. ^1 {{cite web|url=https://www.gnu.org/software/guile/manual/html_node/Arrays.html|title=Guile Manual, Arrays|publisher=GNU Project}} 15. ^1 {{cite web|url=https://www.gnu.org/software/guile/manual/html_node/SLIB.html|title=Guile Manual, SLIB|publisher=GNU Project|quote=SLIB is not included in the Guile distribution, but can be installed separately.}} 16. ^1 "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/cc copies the entire C stack into the heap; invoking a continuation copies the stack back from the heap and uses the longjmp function to reactivate it. This implementation has a number of drawbacks...", Blandy 1997, p. 99.17. ^1 {{cite web|url=https://www.gnu.org/software/guile/manual/html_node/History.html|title=Guile Manual, History}} 18. ^1 "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 19. ^1 "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. 20. ^1 {{cite web|url=http://www.advogato.org/person/wingo/diary.html?start=328|title=Older blog entries for wingo (starting at number 328)|first=Andy|last=Wingo|publisher=Advogato}} 21. ^1 {{cite web|url=https://www.gnu.org/software/guile/news.html |title=Guile News |publisher=GNU Project |deadurl=yes |archiveurl=https://web.archive.org/web/20140328123925/http://www.gnu.org/software/guile/news.html |archivedate=2014-03-28 |df= }} 22. ^1 {{cite web|last=Lord|first=Thomas|title=An Anatomy of Guile The Interface to Tcl/Tk|url=https://www.usenix.org/publications/library/proceedings/tcl95/full_papers/lord.ps|work=Third Annual Tcl/Tk Workshop|publisher=Usenix|accessdate=23 November 2010|location=Toronto, Ontario, Canada|format=PostScript|date=July 1995}} 23. ^1 {{cite web|url=https://www.gnu.org/software/guile/manual/html_node/Other-Languages.html|title=Guile Manual, Other Languages|publisher=GNU Project|quote=Guile is still fundamentally a Scheme, but it tries to support a wide variety of language building-blocks, so that other languages can be implemented on top of Guile.}} 24. ^1 {{cite web|url=https://www.gnu.org/software/guile/manual/html_node/Compiler-Tower.html|title=Guile Manual, Compiler Tower|publisher=GNU Project|quote=Guile defines a tower of languages, starting at Scheme and progressively simplifying down to languages that resemble the VM instruction set.}} 25. ^1 {{cite web|url=http://lists.gnu.org/archive/html/guile-devel/2011-07/msg00054.html|title=Re. Elisp implementation?|publisher=BT Templeton}} }} Further reading
External links{{Portal|Free and open-source software}}
7 : Free compilers and interpreters|GNU Project software|Scheme (programming language)|Scheme (programming language) implementations|Scheme (programming language) interpreters|Scripting languages|Software using the GPL linking exception |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。