history.texi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. @c -*-texinfo-*-
  2. @c This is part of the GNU Guile Reference Manual.
  3. @c Copyright (C) 2008, 2010, 2011, 2013, 2018, 2020
  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, Marius had mostly moved on to
  112. other things, so Neil Jerram and Ludovic Court@`es stepped up to take on
  113. the primary maintenance responsibility. Neil and Ludovic were joined by
  114. Andy Wingo in late 2009, allowing Neil to step away, and Mark Weaver
  115. joined shortly thereafter. After spending more than 5 years in the
  116. role, Mark stepped down as well, leaving Ludovic and Andy as the current
  117. co-maintainers of Guile as of January 2020.
  118. Of course, a large part of the actual work on Guile has come from
  119. other contributors too numerous to mention, but without whom the world
  120. would be a poorer place.
  121. @node A Timeline of Selected Guile Releases
  122. @subsection A Timeline of Selected Guile Releases
  123. @table @asis
  124. @item guile-i --- 4 February 1995
  125. SCM, turned into a library.
  126. @item guile-ii --- 6 April 1995
  127. A low-level module system was added. Tcl/Tk support was added,
  128. allowing extension of Scheme by Tcl or vice versa. POSIX support was
  129. improved, and there was an experimental stab at Java integration.
  130. @item guile-iii --- 18 August 1995
  131. The C-like syntax, ctax, was improved, but mostly this release
  132. featured a start at the task of breaking Guile into pieces.
  133. @item 1.0 --- 5 January 1997
  134. @code{#f} was distinguished from @code{'()}. User-level, cooperative
  135. multi-threading was added. Source-level debugging became more useful,
  136. and programmer's and user's manuals were begun. The module system
  137. gained a high-level interface, which is still used today in more or
  138. less the same form.
  139. @item 1.1 --- 16 May 1997
  140. @itemx 1.2 --- 24 June 1997
  141. Support for Tcl/Tk and ctax were split off as separate packages, and
  142. have remained there since. Guile became more compatible with SCSH, and
  143. more useful as a UNIX scripting language. Libguile could now be built as
  144. a shared library, and third-party extensions written in C became
  145. loadable via dynamic linking.
  146. @item 1.3.0 --- 19 October 1998
  147. Command-line editing became much more pleasant through the use of the
  148. readline library. The initial support for internationalization via
  149. multi-byte strings was removed; 10 years were to pass before proper
  150. internationalization would land again. Initial Emacs Lisp support
  151. landed, ports gained better support for file descriptors, and fluids
  152. were added.
  153. @item 1.3.2 --- 20 August 1999
  154. @itemx 1.3.4 --- 25 September 1999
  155. @itemx 1.4 --- 21 June 2000
  156. A long list of lispy features were added: hooks, Common Lisp's
  157. @code{format}, optional and keyword procedure arguments,
  158. @code{getopt-long}, sorting, random numbers, and many other fixes and
  159. enhancements. Guile also gained an interactive debugger, interactive
  160. help, and better backtraces.
  161. @item 1.6 --- 6 September 2002
  162. Guile gained support for the R5RS standard, and added a number of SRFI
  163. modules. The module system was expanded with programmatic support for
  164. identifier selection and renaming. The GOOPS object system was merged
  165. into Guile core.
  166. @item 1.8 --- 20 February 2006
  167. Guile's arbitrary-precision arithmetic switched to use the GMP
  168. library, and added support for exact rationals. Guile's embedded
  169. user-space threading was removed in favor of POSIX pre-emptive
  170. threads, providing true multiprocessing. Gettext support was added,
  171. and Guile's C API was cleaned up and orthogonalized in a massive way.
  172. @item 2.0 --- 16 February 2010
  173. A virtual machine was added to Guile, along with the associated compiler
  174. and toolchain. Support for internationalization was finally
  175. reimplemented, in terms of unicode, locales, and libunistring. Running
  176. Guile instances became controllable and debuggable from within Emacs,
  177. via Geiser. Guile caught up to features found in a number of other
  178. Schemes: SRFI-18 threads, module-hygienic macros, a profiler, tracer,
  179. and debugger, SSAX XML integration, bytevectors, a dynamic FFI,
  180. delimited continuations, module versions, and partial support for R6RS.
  181. @item 2.2 --- 15 March 2017
  182. The virtual machine and introduced in 2.0 was completely rewritten,
  183. along with much of the compiler and toolchain. This speeds up many
  184. Guile programs as well as reducing startup time and memory usage.
  185. Guile's POSIX multithreading was improved, stacks became dynamically
  186. expandable, the ports facility gained support for non-blocking I/O.
  187. @item 3.0 -- January 2020
  188. Guile gained support for native code generation via a simple
  189. just-in-time (JIT) compiler, further improving the speed of its virtual
  190. machine. The compiler itself gained a number of new optimizations:
  191. inlining of top-level bindings, better closure optimization, and better
  192. unboxing of integer and floating-point values. R7RS support was added,
  193. and R6RS support improved. The exception facility (throw and catch) was
  194. rewritten in terms of SRFI-34 exception handlers.
  195. @end table
  196. @node Status
  197. @subsection Status, or: Your Help Needed
  198. Guile has achieved much of what it set out to achieve, but there is
  199. much remaining to do.
  200. There is still the old problem of bringing existing applications into
  201. a more Emacs-like experience. Guile has had some successes in this
  202. respect, but still most applications in the GNU system are without
  203. Guile integration.
  204. Getting Guile to those applications takes an investment, the
  205. ``hacktivation energy'' needed to wire Guile into a program that only
  206. pays off once it is good enough to enable new kinds of behavior. This
  207. would be a great way for new hackers to contribute: take an
  208. application that you use and that you know well, think of something
  209. that it can't yet do, and figure out a way to integrate Guile and
  210. implement that task in Guile.
  211. With time, perhaps this exposure can reverse itself, whereby programs
  212. can run under Guile instead of vice versa, eventually resulting in the
  213. Emacsification of the entire GNU system. Indeed, this is the reason
  214. for the naming of the many Guile modules that live in the @code{ice-9}
  215. namespace, a nod to the fictional substance in Kurt Vonnegut's
  216. novel, Cat's Cradle, capable of acting as a seed crystal to
  217. crystallize the mass of software.
  218. Implicit to this whole discussion is the idea that dynamic languages
  219. are somehow better than languages like C. While languages like C have
  220. their place, Guile's take on this question is that yes, Scheme is more
  221. expressive than C, and more fun to write. This realization carries an
  222. imperative with it to write as much code in Scheme as possible rather
  223. than in other languages.
  224. These days it is possible to write extensible applications almost
  225. entirely from high-level languages, through byte-code and native
  226. compilation, speed gains in the underlying hardware, and foreign call
  227. interfaces in the high-level language. Smalltalk systems are like this,
  228. as are Common Lisp-based systems. While there already are a number of
  229. pure-Guile applications out there, in the past users have still needed
  230. to drop down to C for some tasks: interfacing to system libraries that
  231. don't have prebuilt Guile interfaces, and for some tasks requiring high
  232. performance. With the arrival of native code generation via a JIT
  233. compiler in Guile 3.0, most of these older applications can now be
  234. updated to move more C code to Scheme.
  235. Still, even with an all-Guile application, sometimes you want to
  236. provide an opportunity for users to extend your program from a
  237. language with a syntax that is closer to C, or to Python. Another
  238. interesting idea to consider is compiling e.g.@: Python to Guile. It's
  239. not that far-fetched of an idea: see for example IronPython or JRuby.
  240. Also, there's Emacs itself. Guile's Emacs Lisp support has reached an
  241. excellent level of correctness, robustness, and speed. However there is
  242. still work to do to finish its integration into Emacs itself. This will
  243. give lots of exciting things to Emacs: native threads, a real object
  244. system, more sophisticated types, cleaner syntax, and access to all of
  245. the Guile extensions.
  246. Finally, so much of the world's computation is performed in web browsers
  247. that it makes sense to ask ourselves what the Guile-on-the-web-client
  248. story is. With the advent of WebAssembly, there may finally be a
  249. reasonable compilation target that's present on almost all user-exposed
  250. devices. Especially with the upcoming proposals to allow for tail
  251. calls, delimited continuations, and GC-managed objects, Scheme might
  252. once again have a place in the web browser. Get to it!