# HG changeset patch # User Christian Urban # Date 1695297447 -3600 # Node ID e86ea06e3b25fa2f660dad228ab0df3cb77c59d9 # Parent bb54e7aa1a3fc17b7f5f5be5ff40652c10bdf0f8 updated diff -r bb54e7aa1a3f -r e86ea06e3b25 cws/cw04.pdf Binary file cws/cw04.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 hws/hw01.pdf Binary file hws/hw01.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 hws/hw01.tex --- a/hws/hw01.tex Tue Sep 19 12:56:10 2023 +0100 +++ b/hws/hw01.tex Thu Sep 21 12:57:27 2023 +0100 @@ -128,8 +128,14 @@ \end{center} \solution{no, yes (why?), no.} + + +\item Given the extended regular expression \texttt{[b-d]a?e+}, + what does the equivalent basic regular expression look like? - + \solution{$(b + c + d) \cdot (a + 0) \cdot (e \cdot e^*)$} + + \item \POSTSCRIPT \end{enumerate} diff -r bb54e7aa1a3f -r e86ea06e3b25 hws/hw02.pdf Binary file hws/hw02.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 hws/hw03.pdf Binary file hws/hw03.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 hws/hw04.pdf Binary file hws/hw04.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 hws/hw05.pdf Binary file hws/hw05.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 hws/hw06.pdf Binary file hws/hw06.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 hws/hw07.pdf Binary file hws/hw07.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 hws/hw08.pdf Binary file hws/hw08.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 hws/hw09.pdf Binary file hws/hw09.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 slides/slides01.pdf Binary file slides/slides01.pdf has changed diff -r bb54e7aa1a3f -r e86ea06e3b25 slides/slides01.tex --- a/slides/slides01.tex Tue Sep 19 12:56:10 2023 +0100 +++ b/slides/slides01.tex Thu Sep 21 12:57:27 2023 +0100 @@ -53,185 +53,185 @@ % \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}[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{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{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,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.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} +% \begin{textblock}{3}(0.3,13) +% \small{}matching with strings +% \bl{$\underbrace{\texttt{a}...\texttt{a}}_n$} +% \end{textblock} -\end{frame} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \end{frame} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{frame}[c,fragile] - \frametitle{Incidents} +% \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{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 +% \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} +% \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} +% \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} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \end{frame} +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\begin{frame}[c] +% %\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} -\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}<1-10> +%\end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame}[t] @@ -659,10 +659,10 @@ \begin{frame}[c] \frametitle{Homework} -Last year(s): I did not give out solutions; students sent emails to me and I responded them individually\bigskip\\ +Until 2 years ago: I did not give out solutions; students sent emails to me and I responded to them individually.\bigskip\\ -This year: We will do homework mainly during the Labs (TAs have the solutions)\bigskip\\\pause +Since last year: We will review the homework mainly during the SGTs.\bigskip\\\pause I will still choose the questions from the HW for the exam, but there might be some larger amount of deviation. @@ -1708,13 +1708,15 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame}[c] -\frametitle{\begin{tabular}{c}\\[3cm]\alert{Questions?}\end{tabular}} +\frametitle{\begin{tabular}{c}\\[2cm]\alert{Questions?}\end{tabular}} \begin{tabular}{lll} - TAs: & Huang Linh & (took the module last year)\\ - & Alfredo Musumeci \\ - & Issa Kabir \\ + SGT TAs: & Flavio Melinte Citea & (was a KURF last summer)\\ + & Krishi Wali \\ + & Meilai Ji \medskip\\ + Amm Helpers & Harry Dilnot & (harry.dilnot\@kcl.ac.uk)\\ + & Meilai Ji & (meilai.ji\@kcl.ac.uk)\medskip\\ \end{tabular} \mbox{} \end{frame} diff -r bb54e7aa1a3f -r e86ea06e3b25 style.sty --- a/style.sty Tue Sep 19 12:56:10 2023 +0100 +++ b/style.sty Thu Sep 21 12:57:27 2023 +0100 @@ -87,7 +87,7 @@ improvement, I am very grateful to hear.\medskip If *you* want to share anything (code, videos, links), you are -encouraged to do so. Just drop me an email.} +encouraged to do so. Just drop me an email or send a message to the Forum.} % CW deadlines