]> git.lizzy.rs Git - metalua.git/blobdiff - doc/manual/springs-ref.tex
fix CRLF
[metalua.git] / doc / manual / springs-ref.tex
index 01c62e9176519e4be2bd2231cab5fb8a7fd59212..9b2663565be6a1bf724ecdb8b4a566d5f3d3f83b 100644 (file)
@@ -1,42 +1,42 @@
-\section{{\tt springs}: separate universes for Lua} \r
-\r
-\subsection{Origins and purpose}\r
-Springs (Serialization through Pluto for RINGS) is an extension of Lua Rings and\r
-Pluto: Lua Rings allow to create new Lua states from within Lua, but offers\r
-limited communication between them: a master universe can only send instruction\r
-to a slave universe through a ``{\tt dostring}'', and the slave universe can\r
-only send back strings, integers and booleans as results. Since Pluto allows to\r
-serialize pretty much any Lua value as a string, it's used to create powerful\r
-bidirectional communications between universes.\r
-\r
-Springs is used internally by metalua to prevent different files' compile time\r
-actions to interfere with each other: each file is compiled on a fresh clean\r
-single-use slate.\r
-\r
-The underlying projects can be found on the web:\r
-\begin{itemize}\r
-\item \verb|<http://www.keplerproject.org/rings/>|\r
-\item \verb|<http://luaforge.net/projects/pluto/>|\r
-\end{itemize}\r
-Notice however that the Pluto version used in metalua has significantly patched\r
-and debugged by Ivko Stanilov.\r
-\r
-\subsection{API}\r
-Go to Lua Rings web site for a reference on its original API. This API is\r
-extended by spring with:\r
-\begin{itemize}\r
-\item function {\tt springs.new()} which creates a new universe ready for Pluto\r
-  communication;\r
-\item ({\tt:dostring()} works as usual)\r
-\item {\tt :pcall(f, arg1, ..., argn)} works as standard function pcall(),\r
-  except that execution occurs in the sub-state. Arguments are passed and\r
-  results are returned transparently acrosse universes. Moreover, 'f' can also\r
-  be a string, rather than a function. If it's a string, it must eval to a\r
-  function in the substate's context. This allows to pass standard functions\r
-  easily. For instance:\\\r
-  \verb|r:pcall('table.concat', {'a', 'b', 'c'}, ',')|\r
-\item {\tt :call()} is similar to :pcall(), except that in case of error, it\r
-  actually throws the error in the sender universe's context. Therefore, it\r
-  doesn't return a success status as does pcall(). For instance: \\\r
-  \verb|assert('xxx' == r:call('string.rep', 'x', 3))|\r
-\end{itemize}\r
+\section{{\tt springs}: separate universes for Lua} 
+
+\subsection{Origins and purpose}
+Springs (Serialization through Pluto for RINGS) is an extension of Lua Rings and
+Pluto: Lua Rings allow to create new Lua states from within Lua, but offers
+limited communication between them: a master universe can only send instruction
+to a slave universe through a ``{\tt dostring}'', and the slave universe can
+only send back strings, integers and booleans as results. Since Pluto allows to
+serialize pretty much any Lua value as a string, it's used to create powerful
+bidirectional communications between universes.
+
+Springs is used internally by metalua to prevent different files' compile time
+actions to interfere with each other: each file is compiled on a fresh clean
+single-use slate.
+
+The underlying projects can be found on the web:
+\begin{itemize}
+\item \verb|<http://www.keplerproject.org/rings/>|
+\item \verb|<http://luaforge.net/projects/pluto/>|
+\end{itemize}
+Notice however that the Pluto version used in metalua has significantly patched
+and debugged by Ivko Stanilov.
+
+\subsection{API}
+Go to Lua Rings web site for a reference on its original API. This API is
+extended by spring with:
+\begin{itemize}
+\item function {\tt springs.new()} which creates a new universe ready for Pluto
+  communication;
+\item ({\tt:dostring()} works as usual)
+\item {\tt :pcall(f, arg1, ..., argn)} works as standard function pcall(),
+  except that execution occurs in the sub-state. Arguments are passed and
+  results are returned transparently acrosse universes. Moreover, 'f' can also
+  be a string, rather than a function. If it's a string, it must eval to a
+  function in the substate's context. This allows to pass standard functions
+  easily. For instance:\\
+  \verb|r:pcall('table.concat', {'a', 'b', 'c'}, ',')|
+\item {\tt :call()} is similar to :pcall(), except that in case of error, it
+  actually throws the error in the sender universe's context. Therefore, it
+  doesn't return a success status as does pcall(). For instance: \\
+  \verb|assert('xxx' == r:call('string.rep', 'x', 3))|
+\end{itemize}