Binary file handouts/amm-ho.pdf has changed
--- a/handouts/amm-ho.tex Mon Sep 21 10:44:48 2020 +0100
+++ b/handouts/amm-ho.tex Mon Sep 21 13:16:02 2020 +0100
@@ -77,7 +77,7 @@
\texttt{name-of-the-file.sc} and requires the file to be in the same
directory where \texttt{amm} is working in. This will be very convenient
for the compiler we implement in CFL, because it allows us to easily
-break-up the code into the lexer, parser and code generator.
+break up the code into the lexer, parser and code generator.
Another feature which exists in Ammonite, but not yet in the
current version of Scala (it will be in the next version called dotty)
@@ -114,7 +114,20 @@
\noindent
What is also good in Ammonite that you can specify more than one
function to be ``main'' and then specify on the command line which
-function do you want to run as entry-point.\bigskip
+function you want to run as entry-point.
+
+Another feature you might like to use is that Ammonite can ``watch'' files.
+This means it can automatically re-run a file when it is saved. For this
+you have to call \texttt{amm} with the option \texttt{-w}, as in
+
+\begin{lstlisting}[numbers=none,language=Scala]
+$ amm -w file.sc
+\end{lstlisting} %% $
+
+\noindent Of course this requires that you use \texttt{println} for
+inspecting any data, as otherwise nothing will be displayed at the
+commandline.
+\bigskip
\noindent
To sum up, Ammonite is a really useful addition to the Scala ecosystem.