history.texi 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. @c -*-texinfo-*-
  2. @c This is part of the GNU Guile Reference Manual.
  3. @c Copyright (C) 2008, 2010, 2011
  4. @c Free Software Foundation, Inc.
  5. @c See the file guile.texi for copying conditions.
  6. @node History
  7. @section A Brief History of Guile
  8. Guile is an artifact of historical processes, both as code and as a
  9. community of hackers. It is sometimes useful to know this history when
  10. hacking the source code, to know about past decisions and future
  11. directions.
  12. Of course, the real history of Guile is written by the hackers hacking
  13. and not the writers writing, so we round up the section with a note on
  14. current status and future directions.
  15. @menu
  16. * The Emacs Thesis::
  17. * Early Days::
  18. * A Scheme of Many Maintainers::
  19. * A Timeline of Selected Guile Releases::
  20. * Status::
  21. @end menu
  22. @node The Emacs Thesis
  23. @subsection The Emacs Thesis
  24. The story of Guile is the story of bringing the development experience
  25. of Emacs to the mass of programs on a GNU system.
  26. Emacs, when it was first created in its GNU form in 1984, was a new
  27. take on the problem of ``how to make a program''. The Emacs thesis is
  28. that it is delightful to create composite programs based on an
  29. orthogonal kernel written in a low-level language together with a
  30. powerful, high-level extension language.
  31. Extension languages foster extensible programs, programs which adapt
  32. readily to different users and to changing times. Proof of this can be
  33. seen in Emacs' current and continued existence, spanning more than a
  34. quarter-century.
  35. Besides providing for modification of a program by others, extension
  36. languages are good for @emph{intension} as well. Programs built in
  37. ``the Emacs way'' are pleasurable and easy for their authors to flesh
  38. out with the features that they need.
  39. After the Emacs experience was appreciated more widely, a number of
  40. hackers started to consider how to spread this experience to the rest
  41. of the GNU system. It was clear that the easiest way to Emacsify a
  42. program would be to embed a shared language implementation into it.
  43. @node Early Days
  44. @subsection Early Days
  45. Tom Lord was the first to fully concentrate his efforts on an
  46. embeddable language runtime, which he named ``GEL'', the GNU Extension
  47. Language.
  48. GEL was the product of converting SCM, Aubrey Jaffer's implementation
  49. of Scheme, into something more appropriate to embedding as a library.
  50. (SCM was itself based on an implementation by George Carrette, SIOD.)
  51. Lord managed to convince Richard Stallman to dub GEL the official
  52. extension language for the GNU project. It was a natural fit, given
  53. that Scheme was a cleaner, more modern Lisp than Emacs Lisp. Part of
  54. the argument was that eventually when GEL became more capable, it
  55. could gain the ability to execute other languages, especially Emacs
  56. Lisp.
  57. Due to a naming conflict with another programming language, Jim Blandy
  58. suggested a new name for GEL: ``Guile''. Besides being a recursive
  59. acronym, ``Guile'' craftily follows the naming of its ancestors,
  60. ``Planner'', ``Conniver'', and ``Schemer''. (The latter was truncated
  61. to ``Scheme'' due to a 6-character file name limit on an old operating
  62. system.) Finally, ``Guile'' suggests ``guy-ell'', or ``Guy L.
  63. Steele'', who, together with Gerald Sussman, originally discovered
  64. Scheme.
  65. Around the same time that Guile (then GEL) was readying itself for
  66. public release, another extension language was gaining in popularity,
  67. Tcl. Many developers found advantages in Tcl because of its shell-like
  68. syntax and its well-developed graphical widgets library, Tk. Also, at
  69. the time there was a large marketing push promoting Tcl as a
  70. ``universal extension language''.
  71. Richard Stallman, as the primary author of GNU Emacs, had a particular
  72. vision of what extension languages should be, and Tcl did not seem to
  73. him to be as capable as Emacs Lisp. He posted a criticism to the
  74. comp.lang.tcl newsgroup, sparking one of the internet's legendary
  75. flamewars. As part of these discussions, retrospectively dubbed the
  76. ``Tcl Wars'', he announced the Free Software Foundation's intent to
  77. promote Guile as the extension language for the GNU project.
  78. It is a common misconception that Guile was created as a reaction to
  79. Tcl. While it is true that the public announcement of Guile happened
  80. at the same time as the ``Tcl wars'', Guile was created out of a
  81. condition that existed outside the polemic. Indeed, the need for a
  82. powerful language to bridge the gap between extension of existing
  83. applications and a more fully dynamic programming environment is still
  84. with us today.
  85. @node A Scheme of Many Maintainers
  86. @subsection A Scheme of Many Maintainers
  87. Surveying the field, it seems that Scheme implementations correspond
  88. with their maintainers on an N-to-1 relationship. That is to say, that
  89. those people that implement Schemes might do so on a number of
  90. occasions, but that the lifetime of a given Scheme is tied to the
  91. maintainership of one individual.
  92. Guile is atypical in this regard.
  93. Tom Lord maintained Guile for its first year and a half or so,
  94. corresponding to the end of 1994 through the middle of 1996. The
  95. releases made in this time constitute an arc from SCM as a standalone
  96. program to Guile as a reusable, embeddable library, but passing
  97. through a explosion of features: embedded Tcl and Tk, a toolchain for
  98. compiling and disassembling Java, addition of a C-like syntax,
  99. creation of a module system, and a start at a rich POSIX interface.
  100. Only some of those features remain in Guile. There were ongoing
  101. tensions between providing a small, embeddable language, and one which
  102. had all of the features (e.g.@: a graphical toolkit) that a modern Emacs
  103. might need. In the end, as Guile gained in uptake, the development
  104. team decided to focus on depth, documentation and orthogonality rather
  105. than on breadth. This has been the focus of Guile ever since, although
  106. there is a wide range of third-party libraries for Guile.
  107. Jim Blandy presided over that period of stabilization, in the three
  108. years until the end of 1999, when he too moved on to other projects.
  109. Since then, Guile has had a group maintainership. The first group was
  110. Maciej Stachowiak, Mikael Djurfeldt, and Marius Vollmer, with Vollmer
  111. staying on the longest. By late 2007, Vollmer had mostly moved on to
  112. other things, so Neil Jerram and Ludovic Court@`es
  113. stepped up to take on the primary maintenance responsibility. Jerram and
  114. Court@`es were joined by Andy Wingo in late 2009.
  115. Of course, a large part of the actual work on Guile has come from
  116. other contributors too numerous to mention, but without whom the world
  117. would be a poorer place.
  118. @node A Timeline of Selected Guile Releases
  119. @subsection A Timeline of Selected Guile Releases
  120. @table @asis
  121. @item guile-i --- 4 February 1995
  122. SCM, turned into a library.
  123. @item guile-ii --- 6 April 1995
  124. A low-level module system was added. Tcl/Tk support was added,
  125. allowing extension of Scheme by Tcl or vice versa. POSIX support was
  126. improved, and there was an experimental stab at Java integration.
  127. @item guile-iii --- 18 August 1995
  128. The C-like syntax, ctax, was improved, but mostly this release
  129. featured a start at the task of breaking Guile into pieces.
  130. @item 1.0 --- 5 January 1997
  131. @code{#f} was distinguished from @code{'()}. User-level, cooperative
  132. multi-threading was added. Source-level debugging became more useful,
  133. and programmer's and user's manuals were begun. The module system
  134. gained a high-level interface, which is still used today in more or
  135. less the same form.
  136. @item 1.1 --- 16 May 1997
  137. @itemx 1.2 --- 24 June 1997
  138. Support for Tcl/Tk and ctax were split off as separate packages, and
  139. have remained there since. Guile became more compatible with SCSH, and
  140. more useful as a UNIX scripting language. Libguile could now be built as
  141. a shared library, and third-party extensions written in C became
  142. loadable via dynamic linking.
  143. @item 1.3.0 --- 19 October 1998
  144. Command-line editing became much more pleasant through the use of the
  145. readline library. The initial support for internationalization via
  146. multi-byte strings was removed; 10 years were to pass before proper
  147. internationalization would land again. Initial Emacs Lisp support
  148. landed, ports gained better support for file descriptors, and fluids
  149. were added.
  150. @item 1.3.2 --- 20 August 1999
  151. @itemx 1.3.4 --- 25 September 1999
  152. @itemx 1.4 --- 21 June 2000
  153. A long list of lispy features were added: hooks, Common Lisp's
  154. @code{format}, optional and keyword procedure arguments,
  155. @code{getopt-long}, sorting, random numbers, and many other fixes and
  156. enhancements. Guile also gained an interactive debugger, interactive
  157. help, and better backtraces.
  158. @item 1.6 --- 6 September 2002
  159. Guile gained support for the R5RS standard, and added a number of SRFI
  160. modules. The module system was expanded with programmatic support for
  161. identifier selection and renaming. The GOOPS object system was merged
  162. into Guile core.
  163. @item 1.8 --- 20 February 2006
  164. Guile's arbitrary-precision arithmetic switched to use the GMP
  165. library, and added support for exact rationals. Guile's embedded
  166. user-space threading was removed in favor of POSIX pre-emptive
  167. threads, providing true multiprocessing. Gettext support was added,
  168. and Guile's C API was cleaned up and orthogonalized in a massive way.
  169. @item 2.0 --- 16 February 2010
  170. A virtual machine was added to Guile, along with the associated compiler
  171. and toolchain. Support for internationalization was finally
  172. reimplemented, in terms of unicode, locales, and libunistring. Running
  173. Guile instances became controllable and debuggable from within Emacs,
  174. via Geiser. Guile caught up to features found in a number of other
  175. Schemes: SRFI-18 threads, module-hygienic macros, a profiler, tracer,
  176. and debugger, SSAX XML integration, bytevectors, a dynamic FFI,
  177. delimited continuations, module versions, and partial support for R6RS.
  178. @end table
  179. @node Status
  180. @subsection Status, or: Your Help Needed
  181. Guile has achieved much of what it set out to achieve, but there is
  182. much remaining to do.
  183. There is still the old problem of bringing existing applications into
  184. a more Emacs-like experience. Guile has had some successes in this
  185. respect, but still most applications in the GNU system are without
  186. Guile integration.
  187. Getting Guile to those applications takes an investment, the
  188. ``hacktivation energy'' needed to wire Guile into a program that only
  189. pays off once it is good enough to enable new kinds of behavior. This
  190. would be a great way for new hackers to contribute: take an
  191. application that you use and that you know well, think of something
  192. that it can't yet do, and figure out a way to integrate Guile and
  193. implement that task in Guile.
  194. With time, perhaps this exposure can reverse itself, whereby programs
  195. can run under Guile instead of vice versa, eventually resulting in the
  196. Emacsification of the entire GNU system. Indeed, this is the reason
  197. for the naming of the many Guile modules that live in the @code{ice-9}
  198. namespace, a nod to the fictional substance in Kurt Vonnegut's
  199. novel, Cat's Cradle, capable of acting as a seed crystal to
  200. crystallize the mass of software.
  201. Implicit to this whole discussion is the idea that dynamic languages
  202. are somehow better than languages like C. While languages like C have
  203. their place, Guile's take on this question is that yes, Scheme is more
  204. expressive than C, and more fun to write. This realization carries an
  205. imperative with it to write as much code in Scheme as possible rather
  206. than in other languages.
  207. These days it is possible to write extensible applications almost
  208. entirely from high-level languages, through byte-code and native
  209. compilation, speed gains in the underlying hardware, and foreign call
  210. interfaces in the high-level language. Smalltalk systems are like
  211. this, as are Common Lisp-based systems. While there already are a
  212. number of pure-Guile applications out there, users still need to drop
  213. down to C for some tasks: interfacing to system libraries that don't
  214. have prebuilt Guile interfaces, and for some tasks requiring high
  215. performance.
  216. The addition of the virtual machine in Guile 2.0, together with the
  217. compiler infrastructure, should go a long way to addressing the speed
  218. issues. But there is much optimization to be done. Interested
  219. contributors will find lots of delightful low-hanging fruit, from
  220. simple profile-driven optimization to hacking a just-in-time compiler
  221. from VM bytecode to native code.
  222. Still, even with an all-Guile application, sometimes you want to
  223. provide an opportunity for users to extend your program from a
  224. language with a syntax that is closer to C, or to Python. Another
  225. interesting idea to consider is compiling e.g.@: Python to Guile. It's
  226. not that far-fetched of an idea: see for example IronPython or JRuby.
  227. And then there's Emacs itself. Though there is a somewhat-working Emacs
  228. Lisp language frontend for Guile, it cannot yet execute all of Emacs
  229. Lisp. A serious integration of Guile with Emacs would replace the Elisp
  230. virtual machine with Guile, and provide the necessary C shims so that
  231. Guile could emulate Emacs' C API. This would give lots of exciting
  232. things to Emacs: native threads, a real object system, more
  233. sophisticated types, cleaner syntax, and access to all of the Guile
  234. extensions.
  235. Finally, there is another axis of crystallization, the axis between
  236. different Scheme implementations. Guile does not yet support the
  237. latest Scheme standard, R6RS, and should do so. Like all standards,
  238. R6RS is imperfect, but supporting it will allow more code to run on
  239. Guile without modification, and will allow Guile hackers to produce
  240. code compatible with other schemes. Help in this regard would be much
  241. appreciated.