slides/slides01.tex
changeset 906 2bf1516d730f
parent 880 bc04fc576896
child 922 e86ea06e3b25
--- a/slides/slides01.tex	Wed Dec 21 14:33:05 2022 +0000
+++ b/slides/slides01.tex	Tue Apr 04 22:31:09 2023 +0100
@@ -50,7 +50,188 @@
 %A physical explanation the \emph{dynamic matrix}\\
 %lots of text
 %\end{mybox3}
-%\end{frame}
+% \end{frame}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[t]
+\frametitle{%  
+  \begin{tabular}{@ {}c@ {}}
+  \\[-3mm]
+  \LARGE Lunch with a Lecturer (29 March)\\[5mm] 
+  \end{tabular}}
+
+  I teach CFL (compilers) and PEP (Scala)\bigskip
+
+  \begin{itemize}
+  \item did undergraduate in Germany
+  \item Master in St Andrews
+  \item PhD in Cambridge  
+  \end{itemize}\bigskip\bigskip
+
+  use mainly the Isabelle theorem prover in my work (see 6CCS3VER)
+
+  write code in functional programming languages (Scala, SML, Ocaml, Haskell)
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[c]
+\frametitle{Why Bother with Regexes?}
+
+\begin{columns}[t,onlytextwidth]
+\begin{column}{1.8cm}
+\mbox{}   
+\end{column}    
+\begin{column}{.5\textwidth}
+\small{}Ruby, Python, Java 8\medskip\\
+\begin{tikzpicture}\footnotesize
+\begin{axis}[
+    xlabel={$n$},
+    x label style={at={(1.05,0.0)}},
+    ylabel={time in secs},
+    enlargelimits=false,
+    xtick={0,5,...,30},
+    xmax=33,
+    ymax=35,
+    ytick={0,5,...,30},
+    scaled ticks=false,
+    axis lines=left,
+    width=\textwidth,
+    height=4cm, 
+    legend entries={Python,Ruby},  
+    legend pos=north west,
+    legend cell align=left]
+\addplot[blue,mark=*, mark options={fill=white}] table {re-python.data};
+\addplot[brown,mark=triangle*, mark options={fill=white}] table {re-ruby.data};
+\end{axis}
+\end{tikzpicture}
+\begin{tikzpicture}\footnotesize
+\begin{axis}[
+    xlabel={$n$},
+    x label style={at={(1.05,0.0)}},
+    ylabel={time in secs},
+    enlargelimits=false,
+    xtick={0,5,...,30},
+    xmax=33,
+    ymax=35,
+    ytick={0,5,...,30},
+    scaled ticks=false,
+    axis lines=left,
+    width=\textwidth,
+    height=4cm, 
+    legend entries={Python, Java 8, JavaScript, Swift},  
+    legend pos=north west,
+    legend cell align=left]
+\addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data};   
+\addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data};
+\addplot[red,mark=*, mark options={fill=white}] table {re-js.data};
+\addplot[magenta,mark=*, mark options={fill=white}] table {re-swift.data};
+\end{axis}
+\end{tikzpicture}
+%
+\end{column}
+\begin{column}{.5\textwidth}
+\small{}In PEP \& CFL \medskip\\
+\begin{tikzpicture}\footnotesize
+\begin{axis}[
+    xlabel={$n$},
+    x label style={at={(1.07,0.0)}},
+    ylabel={time in secs},
+    enlargelimits=false,
+    xtick={0,5000,...,10000},
+    xmax=11000,
+    ymax=35,
+    ytick={0,5,...,30},
+    scaled ticks=false,
+    axis lines=left,
+    width=\textwidth,
+    height=4cm]
+\addplot[green,mark=square*,mark options={fill=white}] table {re2.data};
+\addplot[black,mark=square*,mark options={fill=white}] table {re3.data};
+\end{axis}
+\end{tikzpicture}
+\begin{tikzpicture}\footnotesize
+\begin{axis}[
+    xlabel={$n$},
+    x label style={at={(1.07,0.0)}},
+    ylabel={time in secs},
+    enlargelimits=false,
+    ymax=35,
+    ytick={0,5,...,30},
+    scaled ticks=false,
+    axis lines=left,
+    width=\textwidth,
+    height=4cm]
+\addplot[black,mark=square*,mark options={fill=white}] table {re3a.data};
+\end{axis}
+\end{tikzpicture}
+\end{column}
+\end{columns}
+\medskip
+
+\begin{textblock}{3}(-0.1,3.3)
+\small\hfill\bl{\texttt{[a?]\{n\}[a]\{n\}}}:
+\end{textblock}
+
+\begin{textblock}{3}(-0.1,8.7)  
+\small\hfill\bl{\texttt{(a*)*b}}:
+\end{textblock}
+
+\begin{textblock}{3}(0.3,13)
+\small{}matching with strings
+\bl{$\underbrace{\texttt{a}...\texttt{a}}_n$}  
+\end{textblock}
+
+\end{frame} 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
+    
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[c,fragile]
+  \frametitle{Incidents}
+    
+  \begin{itemize}
+  \item a global outage on 2 July 2019 at \textbf{Cloudflare} 
+  (first one for six years)\medskip
+  
+  \begin{center}\small\color{blue}
+  \begin{verbatim}  
+  (?:(?:\"|'|\]|\}|\\|\d|(?:nan|infinity|true|false|
+  null|undefined|symbol|math)|\`|\-|\+)+[)]*;?((?:\s
+  |-|~|!|{}|\|\||\+)*.*(?:.*=.*)))  
+  \end{verbatim}
+  \end{center}\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip    
+  
+  \item on 20 July 2016 the \textbf{Stack Exchange} webpage went down
+    because of an evil regular expression
+    \here{https://stackstatus.net/post/147710624694/outage-postmortem-july-20-2016}    
+  \end{itemize}
+  
+  \begin{textblock}{6}(6,7.6)
+    \includegraphics[scale=0.14]{../pics/cloudflare.png}\\
+    \footnotesize
+    It serves more web traffic than Twitter, Amazon, Apple,
+    Instagram, Bing \& Wikipedia combined.
+    \here{https://blog.cloudflare.com/details-of-the-cloudflare-outage-on-july-2-2019/}
+    \end{textblock}
+  
+  \end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
+    
+\begin{frame}[c]
+
+\frametitle{}
+\begin{mybox3}{}\it
+  ``This conversation is interesting to me, and I've researched it a little bit... I also disagree with Dr. Urban on the cost/benefit of non-GC languages...[..]\\
+
+  But regardless, Scala is a lot slower than, say, C or Rust. To say it's not is basically wrong (imo)....[..]
+  ''\\
+\mbox{}\hfill-- Oliver Iliffe,  discussion this year in PEP
+\end{mybox3}\pause
+
+\end{frame}
+
+\begin{frame}<1-10>
+\end{frame}  
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[t]