1 \input texinfo @c -*-texinfo-*-
3 @setfilename 8sync.info
7 Copyright @copyright{} 2015 Christopher Allan Webber @email{cwebber@@dustycloud.org}
11 Permission is granted to copy, distribute and/or modify this document
12 under the terms of the GNU Free Documentation License, Version 1.3
13 or any later version published by the Free Software Foundation;
14 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
15 A copy of the license is included in the section entitled ``GNU
16 Free Documentation License''.
18 A copy of the license is also available from the Free Software
19 Foundation Web site at @url{http://www.gnu.org/licenses/fdl.html}.
21 Altenately, this document is also available under the Lesser General
22 Public License, version 3 or later, as published by the Free Software
25 A copy of the license is also available from the Free Software
26 Foundation Web site at @url{http://www.gnu.org/licenses/lgpl.html}.
33 @subtitle Using 8sync, an asynchronous event loop for Guile
34 @author Christopher Allan Webber
36 @vskip 0pt plus 1filll
40 @c Output the table of the contents at the beginning.
50 @c Generate the nodes for this menu with `C-c C-u C-m'.
53 @c Update all node entries with `C-c C-u C-n'.
54 @c Insert new nodes with `C-c C-c n'.
59 * Copying This Manual::
66 8sync's goal is to make asynchronous programming easy. If you've worked
67 with most other asynchronous programming environments, you know that it
68 generally isn't. Usually asynchronous programming involves entering
69 some sort of ``callback hell''. Some nicer environments like Asyncio
70 for Python provide generator-based coroutines, but even these require a
71 lot of work to carefully line up.
73 Coding in 8sync, on the other hand, looks almost entirely like coding
74 anywhere else. This is because 8sync makes great use of a cool feature
75 in Guile called ``delimited continuations'' to power natural-feeling
76 coroutines. Because of this, you can invoke your asynchronous code with
77 a small wrapper around it, and that code will pop off to complete
78 whatever other task it needs to do, and resume your function when it's
79 ready passing back the appropriate value. (No need to manually chain
80 the coroutines together, and no callback hell at all!)
82 Now that's pretty cool!
84 @node Acknowledgements
85 @chapter Acknowledgements
87 8sync has a number of inspirations:
91 @uref{https://docs.python.org/3.5/library/asyncio.html, asyncio}
92 for Python provides a nice asynchronous programming environment, and
93 makes great use of generator-style coroutines. It's a bit more
94 difficult to work with than 8sync (or so thinks the author) because you
95 have to ``line up'' the coroutines.
98 @uref{http://dthompson.us/pages/software/sly.html, Sly}
99 by David Thompson is an awesome functional reactive game programming
100 library for Guile. If you want to write graphical games, Sly is almost
101 certainly a better choice than 8sync. Thanks to David for being very
102 patient in explaining tough concepts; experience on hacking Sly greatly
103 informed 8sync's development. (Check out Sly, it rocks!)
106 Reading @uref{https://mitpress.mit.edu/sicp/, SICP}, particularly
107 @uref{https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-19.html#%_chap_3,
108 Chapter 3's writings on concurrent systems},
109 greatly informed 8sync's design.
112 Finally, @uref{https://docs.python.org/3.5/library/asyncio.html, XUDD}
113 was an earlier ``research project'' that preceeded 8sync. It attempted
114 to bring an actor model system to Python. However, the author
115 eventually grew frustrated with some of Python's limitations, fell in
116 love with Guile, and well... now we have 8sync, which is much more
121 The motivation to build 8sync came out of
122 @uref{https://lists.gnu.org/archive/html/guile-devel/2015-10/msg00015.html, a conversation}
123 at the FSF 30th party between Mark Weaver, David Thompson, Andrew
124 Engelbrecht, and Christopher Allan Webber over how to build
125 an asynchronous event loop for Guile and just what would be needed.
127 A little over a month after that, hacking on 8sync began!
130 @node Copying This Manual
131 @appendix Copying This Manual
133 This manual is licensed under the GNU Free Documentation License, with
134 no invariant sections. At your option, it is also available under the
135 GNU Lesser General Public License, as published by the Free Software
136 Foundation, version 3 or any later version.
139 * GNU Free Documentation License:: License for copying this manual.
142 @c Get fdl.texi from http://www.gnu.org/licenses/fdl.html
143 @node GNU Free Documentation License
144 @section GNU Free Documentation License
156 @c 8sync.texi ends here