slides/slides04.tex
changeset 222 e52cc402caee
parent 217 e689375abcc1
child 229 5549016ab10f
equal deleted inserted replaced
221:9e7897f25e13 222:e52cc402caee
     2 \usepackage{../slides}
     2 \usepackage{../slides}
     3 \usepackage{../graphics}
     3 \usepackage{../graphics}
     4 \usepackage{../langs}
     4 \usepackage{../langs}
     5 %%\usepackage{../data}
     5 %%\usepackage{../data}
     6 \usepackage[export]{adjustbox}
     6 \usepackage[export]{adjustbox}
       
     7 \usetikzlibrary{shapes}
     7 
     8 
     8 \hfuzz=220pt 
     9 \hfuzz=220pt 
     9 
    10 
    10 %\setmonofont[Scale=.88]{Consolas}
    11 %\setmonofont[Scale=.88]{Consolas}
    11 %\newfontfamily{\consolas}{Consolas}
    12 %\newfontfamily{\consolas}{Consolas}
    14         style=mystyle,
    15         style=mystyle,
    15         numbersep=0pt,
    16         numbersep=0pt,
    16         numbers=none,
    17         numbers=none,
    17         xleftmargin=0mm}
    18         xleftmargin=0mm}
    18 
    19 
       
    20 \newcommand{\LEFTarrow}[3]{%
       
    21 \begin{textblock}{0}(#2,#3)%
       
    22 \onslide<#1>{%
       
    23 \begin{tikzpicture}%
       
    24 \node at (0,0) [single arrow, shape border rotate=180, fill=red,text=red]{a};%
       
    25 \end{tikzpicture}}%
       
    26 \end{textblock}}
       
    27 \newcommand{\DOWNarrow}[3]{%
       
    28 \begin{textblock}{0}(#2,#3)%
       
    29 \onslide<#1>{%
       
    30 \begin{tikzpicture}%
       
    31 \node at (0,0) [single arrow, shape border rotate=270, fill=red,text=red]{a};%
       
    32 \end{tikzpicture}}%
       
    33 \end{textblock}}
       
    34 
       
    35 
    19 \newcommand{\bl}[1]{\textcolor{blue}{#1}}     
    36 \newcommand{\bl}[1]{\textcolor{blue}{#1}}     
    20 
    37 
    21 % beamer stuff 
    38 % beamer stuff 
    22 \renewcommand{\slidecaption}{PEP (Scala) 03, King's College London}
    39 \renewcommand{\slidecaption}{PEP (Scala) 04, King's College London}
    23 
    40 
    24 \begin{filecontents}{re3a.data}
    41 \begin{filecontents}{re3a.data}
    25 1 0.00003
    42 1 0.00003
    26 500001 0.22527
    43 500001 0.22527
    27 1000001 0.62752
    44 1000001 0.62752
    52 26 7.08
    69 26 7.08
    53 27 14.12
    70 27 14.12
    54 28 26.69
    71 28 26.69
    55 \end{filecontents}
    72 \end{filecontents}
    56 
    73 
       
    74 \begin{filecontents}{re-js.data}
       
    75 5   0.061
       
    76 10  0.061
       
    77 15  0.061
       
    78 20  0.070
       
    79 23  0.131
       
    80 25  0.308
       
    81 26  0.564
       
    82 28  1.994
       
    83 30  7.648
       
    84 31  15.881 
       
    85 32  32.190
       
    86 \end{filecontents}
       
    87 
    57 \begin{filecontents}{re-java.data}
    88 \begin{filecontents}{re-java.data}
    58 5  0.00298
    89 5  0.00298
    59 10  0.00418
    90 10  0.00418
    60 15  0.00996
    91 15  0.00996
    61 16  0.01710
    92 16  0.01710
    71 26  6.63998
   102 26  6.63998
    72 27  13.35120
   103 27  13.35120
    73 28  29.81185
   104 28  29.81185
    74 \end{filecontents}
   105 \end{filecontents}
    75 
   106 
       
   107 \begin{filecontents}{re-java9.data}
       
   108 1000  0.01410
       
   109 2000  0.04882
       
   110 3000  0.10609
       
   111 4000  0.17456
       
   112 5000  0.27530
       
   113 6000  0.41116
       
   114 7000  0.53741
       
   115 8000  0.70261
       
   116 9000  0.93981
       
   117 10000 0.97419
       
   118 11000 1.28697
       
   119 12000 1.51387
       
   120 14000 2.07079
       
   121 16000 2.69846
       
   122 20000 4.41823
       
   123 24000 6.46077
       
   124 26000 7.64373
       
   125 30000 9.99446
       
   126 34000 12.966885
       
   127 38000 16.281621
       
   128 42000 19.180228
       
   129 46000 21.984721
       
   130 50000 26.950203
       
   131 60000 43.0327746
       
   132 \end{filecontents}
       
   133 
       
   134 
    76 \begin{document}
   135 \begin{document}
    77 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   136 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    78 \begin{frame}[t]
   137 \begin{frame}[t]
    79 \frametitle{%
   138 \frametitle{%
    80   \begin{tabular}{@ {}c@ {}}
   139   \begin{tabular}{@ {}c@ {}}
    81   \\[5mm]
   140   \\[5mm]
    82   \huge PEP Scala (3) 
   141   \huge PEP Scala (4) 
    83   \end{tabular}}
   142   \end{tabular}}
    84 
   143 
    85   \normalsize
   144   \normalsize
    86   \begin{center}
   145   \begin{center}
    87   \begin{tabular}{ll}
   146   \begin{tabular}{ll}
    88     Email:  & christian.urban at kcl.ac.uk\\
   147     Email:  & christian.urban at kcl.ac.uk\\
    89     Office: & N7.07 (North Wing, Bush House)\\
   148     Office: & N\liningnums{7.07} (North Wing, Bush House)\\
    90     Slides \& Code: & KEATS\medskip\\
   149     Slides \& Code: & KEATS\medskip\\
    91     Scala Office & \\
   150     Office Hours: &  Mondays 12:00 -- 14:00\\
    92     Hours: &  Thursdays 11 -- 13\\
       
    93   \end{tabular}
   151   \end{tabular}
    94   \end{center}
   152   \end{center}
    95 
   153 
    96 
   154 
    97 \end{frame}
   155 \end{frame}
    98 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   156 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
    99 
   157 
       
   158 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   159 
       
   160 \begin{frame}[c]
       
   161 \frametitle{Somewhere Remote}
       
   162 
       
   163 \begin{center}
       
   164 \includegraphics[scale=0.37]{../pics/sahara.jpg}
       
   165 \end{center}
       
   166 
       
   167 \end{frame}
       
   168 
       
   169 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   170 
       
   171 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   172 
       
   173 \begin{frame}[t]
       
   174 \frametitle{This is a bit harsh\ldots}
       
   175 
       
   176 \mbox{}\\[-22mm]\mbox{}
       
   177 
       
   178 \begin{center}
       
   179 \begin{bubble}[10.5cm]
       
   180   ...trying a new method because the fucking github reports dont tell me
       
   181   which test failed. It's not really helpful when the inline tests work
       
   182   and it compiles but all i get is 'one test failed'... really helpful my dude.
       
   183 \end{bubble}
       
   184 \end{center}
       
   185 
       
   186 \begin{center}
       
   187 \begin{bubble}[10.5cm]
       
   188   ...Reverted back and finished part 5, this is ridiculous how one test works
       
   189   and all I get is 'ONE TEST FAILED'. Fix your reports before giving us
       
   190   assignments like this...
       
   191 \end{bubble}
       
   192 \end{center}
       
   193 
       
   194 
       
   195 \end{frame}
       
   196 
       
   197 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   198 
       
   199 \begin{frame}[t,fragile]
       
   200 \frametitle{Needless to say I tried it out}
       
   201 
       
   202 \mbox{}\\[-7mm]\mbox{}\footnotesize
       
   203 
       
   204 \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-4mm]
       
   205 > legal_moves(8, Nil, (2,2))
       
   206  = List((3,4), (4,3), (4,1), (3,0), (1,0), (0,1), (0,3), (1,4))
       
   207 
       
   208 > legal_moves(8, Nil, (7,7))
       
   209  = List((6,5), (5,6))
       
   210 
       
   211 > legal_moves(8, List((4,1), (1,0)), (2,2))
       
   212  = List((3,4), (4,3), (3,0), (0,1), (0,3), (1,4))
       
   213 
       
   214 > legal_moves(1, Nil, (0,0))
       
   215  = List((-1,-2), (-2,-1))
       
   216 
       
   217 > legal_moves(2, Nil, (0,0))
       
   218  = List((1,-2), (-1,-2), (-2,-1), (-2,1))
       
   219 
       
   220 > legal_moves(3, Nil, (0,0))
       
   221  = List((1,2), (2,1), (2,-1), (1,-2), (-1,-2), (-2,-1), (-2,1), (-1,2))
       
   222 \end{lstlisting}  
       
   223 
       
   224 \LEFTarrow{1}{9}{9}
       
   225 \LEFTarrow{1}{12}{11}
       
   226 \DOWNarrow{1}{10}{13}
       
   227 
       
   228 \end{frame}
       
   229 
       
   230 
       
   231 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   100 
   232 
   101 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   233 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   102 \begin{frame}[c,fragile]
   234 \begin{frame}[c,fragile]
   103 
   235 \small
   104 \begin{textblock}{6}(0.5,0.5)
   236   
   105 \begin{bubble}[11.5cm]
   237 \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-7mm]
   106 \footnotesize
   238 def is_legal(dim: Int, p: Path, x: Pos): Boolean = {
   107 \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
   239   if (......some_really_long_condition.....) false
   108 import java.util.concurrent._
   240   else true
   109 import java.util.concurrent.atomic._
   241 }
   110 
       
   111   def collatz(input:Int){
       
   112           CollatzConjecture(input);
       
   113           println(count.get());
       
   114       }
       
   115       def collatz_max(input:Int){
       
   116           val List = new Array[Int](input)
       
   117             for (i <- 0 to input-1){
       
   118                 CollaĵConjecture(i);
       
   119                 List(i)=count.get();
       
   120                 count.set(0);
       
   121             }
       
   122             val max = new AtomicInteger();
       
   123             max.set(List(0));
       
   124             val index = new AtomicInteger();
       
   125             index.set(1);
       
   126  
       
   127 \end{lstlisting}
   242 \end{lstlisting}
   128 \end{bubble}
   243 
       
   244 \pause
       
   245 \bigskip
       
   246 \rule{11cm}{0.3mm}
       
   247 \bigskip
       
   248 
       
   249 \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-7mm]
       
   250 def is_legal(dim: Int, p: Path, x: Pos): Boolean = 
       
   251   ......some_really_long_condition.....
       
   252 \end{lstlisting}\pause
       
   253 
       
   254 
       
   255 \end{frame}
       
   256 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
       
   257 
       
   258 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   259 \begin{frame}[c]
       
   260 \frametitle{DFAs}  
       
   261 
       
   262 \begin{center}
       
   263 \begin{tikzpicture}[>=stealth',very thick,auto,
       
   264   every state/.style={minimum size=0pt,inner sep=2pt,
       
   265     draw=blue!50,very thick,fill=blue!20},]
       
   266   
       
   267 \only<1,3->{\node[state,initial] (Q_0)  {$\mbox{Q}_0$};}
       
   268 \only<2>{\node[state,initial,fill=red] (Q_0)  {$\mbox{Q}_0$};}  
       
   269 \only<1,2,4->{\node[state] (Q_1) [right=of Q_0] {$\mbox{Q}_1$};}
       
   270 \only<3>{\node[state,fill=red] (Q_1) [right=of Q_0] {$\mbox{Q}_1$};}
       
   271 \only<-3,5->{\node[state] (Q_2) [below right=of Q_0] {$\mbox{Q}_2$};}
       
   272 \only<4>{\node[state,fill=red] (Q_2) [below right=of Q_0] {$\mbox{Q}_2$};}
       
   273 \only<-4,6->{\node[state] (Q_3) [right=of Q_2] {$\mbox{Q}_3$};}
       
   274 \only<5>{\node[state,fill=red] (Q_3) [right=of Q_2] {$\mbox{Q}_3$};}
       
   275 \only<-5>{\node[state, accepting] (Q_4) [right=of Q_1] {$\mbox{Q}_4$};}
       
   276 \only<6->{\node[state, accepting,fill=red] (Q_4) [right=of Q_1] {$\mbox{Q}_4$};}
       
   277 
       
   278 \path[->] (Q_0) edge node [above]  {\alert{$a$}} (Q_1);
       
   279 \path[->] (Q_1) edge node [above]  {\alert{$a$}} (Q_4);
       
   280 \path[->] (Q_4) edge [loop right] node  {\alert{$a, b$}} ();
       
   281 \path[->] (Q_3) edge node [right]  {\alert{$a$}} (Q_4);
       
   282 \path[->] (Q_2) edge node [above]  {\alert{$a$}} (Q_3);
       
   283 \path[->] (Q_1) edge node [right]  {\alert{$b$}} (Q_2);
       
   284 \path[->] (Q_0) edge node [above]  {\alert{$b$}} (Q_2);
       
   285 \path[->] (Q_2) edge [loop left] node  {\alert{$b$}} ();
       
   286 \path[->] (Q_3) edge [bend left=95, looseness=1.3] node [below]  {\alert{$b$}} (Q_0);
       
   287 \end{tikzpicture}
       
   288 \end{center}
       
   289 
       
   290 \begin{textblock}{9}(4,12)
       
   291 \LARGE{}
       
   292 \only<3->{\boldmath\alert{$a$}}%
       
   293 \only<4->{\boldmath\alert{$b$}}%
       
   294 \only<5->{\boldmath\alert{$a$}}%
       
   295 \only<6->{\boldmath\alert{$a$}}%
       
   296 \only<7->{\boldmath\alert{$a\quad\Rightarrow \textbf{yes}$}}% 
   129 \end{textblock}
   297 \end{textblock}
   130 
   298   
   131 \end{frame}
   299 \end{frame}
   132 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   300 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   133 
   301 
   134 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   302 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   135 \begin{frame}[c,fragile]
   303 \begin{frame}[t]
   136 
   304 \frametitle{DFAs}
   137 \begin{textblock}{6}(0.5,0.5)
   305 
   138 \begin{bubble}[11.5cm]
   306 A \alert{\bf deterministic finite automaton}, DFA, consists of
   139 \footnotesize
   307 5 things:
   140 \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
   308 
   141              for(i<-0 to input-1){
   309 \begin{itemize}
   142                 val temp :Int=max.get();
   310 \item an alphabet \bl{$\varSigma$}  
   143                 if (temp < List(i)){
   311 \item a set of states \bl{$\mbox{Qs}$}
   144                     max.set(List(i));
   312 \item one of these states is the start state \bl{$\mbox{Q}_0$}
   145                     index.set(i);
   313 \item some states are accepting states \bl{$F$}, and
   146                 }
   314 \item there is transition function \bl{$\delta$}\bigskip 
   147             }
   315 
   148             println("("+max.get() +","+ index.get()+ ")");
   316 \small
   149       }
   317 which takes a state  and a character as arguments and produces a 
   150 
   318 new state; this function might not be everywhere defined 
   151       def CollatzConjecture(n: Long): Long = {
   319 \end{itemize}
   152         count.incrementAndGet();
   320 
   153         if (n <= 1)
   321 \begin{center}
   154             1
   322 \bl{$A(\varSigma, \mbox{Qs}, \mbox{Q}_0, F, \delta)$}
   155         else if (n\%2 ==0)
   323 \end{center}
   156             CollatzConjecture(n/2);
   324 
   157             else
   325 \end{frame}
   158                CollatzConjecture((3*n)+1);
   326 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   159    }
       
   160  }
       
   161 \end{lstlisting}
       
   162 \end{bubble}
       
   163 \end{textblock}
       
   164 
       
   165 \end{frame}
       
   166 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
       
   167 
       
   168 
       
   169 
   327 
   170 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   328 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   171 \begin{frame}[c]
   329 \begin{frame}[c]
   172   \frametitle{CW3 (1 Part): Regexes}
   330 \frametitle{NFAs}  
       
   331 
       
   332 \begin{center}
       
   333 \begin{tikzpicture}[>=stealth',very thick, auto,
       
   334     every state/.style={minimum size=0pt,inner sep=3pt,
       
   335       draw=blue!50,very thick,fill=blue!20},scale=2]
       
   336 \node[state,initial]  (Q_0)  {$\mbox{Q}_0$};
       
   337 \node[state] (Q_1) [right=of Q_0] {$\mbox{Q}_1$};
       
   338 \node[state, accepting] (Q_2) [right=of Q_1] {$\mbox{Q}_2$};
       
   339 \path[->] (Q_0) edge [loop above] node  {\alert{$b$}} ();
       
   340 \path[<-] (Q_0) edge node [below]  {\alert{$b$}} (Q_1);
       
   341 \path[->] (Q_0) edge [bend left] node [above]  {\alert{$a$}} (Q_1);
       
   342 \path[->] (Q_0) edge [bend right=45,looseness=1.3] node [below]  {\alert{$a$}} (Q_2);
       
   343 \path[->] (Q_1) edge [loop above] node  {\alert{$a,b$}} ();
       
   344 \path[->] (Q_1) edge node  [above] {\alert{$a$}} (Q_2);
       
   345 \end{tikzpicture}
       
   346 \end{center}
       
   347 
       
   348 \end{frame}
       
   349 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   350 
       
   351 
       
   352 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   353 \begin{frame}[c]
       
   354   \frametitle{CW\liningnums{9} (\liningnums{1} Part): Regexes}
   173   
   355   
   174 \begin{center}
   356 \begin{center}
   175   Graphs: $(a^*)^* b$ and strings $\underbrace{\;a\ldots a\;}_{n}$\bigskip
   357   Graphs: $(a^*)^* b$ and strings $\underbrace{\;a\ldots a\;}_{n}$\bigskip
   176   
   358   
   177 \begin{tabular}[t]{@{\hspace{-8mm}}c@{\hspace{-4mm}}c@{}}
   359 \begin{tabular}[t]{@{\hspace{-8mm}}c@{\hspace{-4mm}}c@{}}
   178 \raisebox{6mm}{\begin{tikzpicture}
   360 \only<1>{\raisebox{6mm}{\begin{tikzpicture}
   179 \begin{axis}[
   361 \begin{axis}[
   180     xlabel={$n$},
   362     xlabel={$n$},
   181     x label style={at={(1.05,0.0)}},
   363     x label style={at={(1.05,0.0)}},
   182     ylabel={time in secs},
   364     ylabel={time in secs},
   183     enlargelimits=false,
   365     enlargelimits=false,
   187     ytick={0,5,...,30},
   369     ytick={0,5,...,30},
   188     scaled ticks=false,
   370     scaled ticks=false,
   189     axis lines=left,
   371     axis lines=left,
   190     width=5.5cm,
   372     width=5.5cm,
   191     height=5cm, 
   373     height=5cm, 
   192     legend entries={Python,  Java 8},  
   374     legend entries={\small{}Python,  \small{}Java 8,  \small{}JavaScript},  
   193     legend pos=north west,
   375     legend pos=north west,
   194     legend cell align=left]
   376     legend cell align=left]
   195 \addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data};  
   377 \addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data};  
   196 \addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data};
   378 \addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data};
       
   379 \addplot[red,mark=*, mark options={fill=white}] table {re-js.data};
   197 \end{axis}
   380 \end{axis}
   198 \end{tikzpicture}}
   381 \end{tikzpicture}}}%
       
   382 \only<2>{\raisebox{0mm}{\begin{tikzpicture}
       
   383 \begin{axis}[
       
   384     xlabel={$n$},
       
   385     x label style={at={(1.05,0.0)}},
       
   386     ylabel={time in secs},
       
   387     %y label style={at={(0.06,0.5)}},
       
   388     enlargelimits=false,
       
   389     %xtick={0,30000,...,60000},
       
   390     xmax=65000,
       
   391     ymax=35,
       
   392     ytick={0,5,...,30},
       
   393     scaled ticks=true,
       
   394     axis lines=left,
       
   395     width=5.5cm,
       
   396     height=5cm, 
       
   397     legend entries={\small{}Java 9},  
       
   398     legend pos=north west]
       
   399 \addplot[cyan,mark=*, mark options={fill=white}] table {re-java9.data};
       
   400 \end{axis}
       
   401 \end{tikzpicture}}}
   199   &
   402   &
   200 \onslide<2>{\begin{tikzpicture}
   403 \onslide<1-2>{\begin{tikzpicture}
   201   \begin{axis}[
   404   \begin{axis}[
   202     xlabel={$n$},
   405     xlabel={$n$},
   203     x label style={at={(1.05,0.0)}},
   406     x label style={at={(1.05,0.0)}},
   204     ylabel={time in secs},
   407     ylabel={time in secs},
   205     enlargelimits=false,
   408     enlargelimits=false,
   208     axis lines=left,
   411     axis lines=left,
   209     %%scaled ticks=false,
   412     %%scaled ticks=false,
   210     width=5.5cm, 
   413     width=5.5cm, 
   211     height=5cm]
   414     height=5cm]
   212 %%\addplot[green,mark=square*,mark options={fill=white}] table {re2a.data};    
   415 %%\addplot[green,mark=square*,mark options={fill=white}] table {re2a.data};    
   213 \addplot[red,mark=square*,mark options={fill=white}] table {re3a.data};
   416 \addplot[magenta,mark=square*,mark options={fill=white}] table {re3a.data};
   214 \end{axis}
   417 \end{axis}
   215 \end{tikzpicture}}
   418 \end{tikzpicture}}
   216 \end{tabular}
   419 \end{tabular}
   217 \end{center}
   420 \end{center}
   218 
   421 
   219 \hfill\small\url{https://vimeo.com/112065252}
   422 \hfill\small\url{https://vimeo.com/112065252}
   220 \end{frame}
   423 \end{frame}
   221 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   424 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   222 
   425 
   223 \begin{frame}[c]
   426 \begin{frame}[c]
   224 \frametitle{Where to go on from here?}
   427 \frametitle{Hint}
   225 
   428 
   226 \begin{itemize}
   429 \begin{center}
   227 \item Martin Odersky (EPFL)\ldots he is currently throwing out everything
   430 \LARGE\textbf{\alert{Pattern-Matching}}
   228   and starts again with the dotty compiler for Scala\medskip
   431 \end{center}
   229 
   432 
   230 \item Elm (\url{http://elm-lang.org})\ldots web applications with style\medskip   
       
   231 
       
   232 \item Haskell, Ocaml, Standard ML, Scheme, \ldots 
       
   233 \end{itemize}  
       
   234 \end{frame}
   433 \end{frame}
   235 
   434 
   236 
   435 
   237 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   436 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   238 
   437 
   239 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   438 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   240 \begin{frame}[c,fragile]
   439 \begin{frame}[c,fragile]
   241 \frametitle{\alert{Questions?}}
   440 \frametitle{\alert{Questions?}}
   242 
   441 
   243 {\tiny
       
   244 \begin{verbatim}
       
   245                                *
       
   246                               * *
       
   247                              *   *
       
   248                             * * * *
       
   249                            *       *
       
   250                           * *     * *
       
   251                          *   *   *   *
       
   252                         * * * * * * * *
       
   253                        *               *
       
   254                       * *             * *
       
   255                      *   *           *   *
       
   256                     * * * *         * * * *
       
   257                    *       *       *       *
       
   258                   * *     * *     * *     * *
       
   259                  *   *   *   *   *   *   *   *
       
   260                 * * * * * * * * * * * * * * * *
       
   261                *                               *
       
   262               * *                             * *
       
   263              *   *                           *   *
       
   264             * * * *                         * * * *
       
   265            *       *                       *       *
       
   266           * *     * *                     * *     * *
       
   267          *   *   *   *                   *   *   *   *
       
   268         * * * * * * * *                 * * * * * * * *
       
   269        *               *               *               *
       
   270       * *             * *             * *             * *
       
   271      *   *           *   *           *   *           *   *
       
   272     * * * *         * * * *         * * * *         * * * *
       
   273    *       *       *       *       *       *       *       *
       
   274   * *     * *     * *     * *     * *     * *     * *     * *
       
   275  *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *
       
   276 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
       
   277 \end{verbatim}}
       
   278 
       
   279 
       
   280 \begin{textblock}{6}(8.5,3.5)
       
   281 \begin{bubble}[5cm]
       
   282 \footnotesize
       
   283 \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
       
   284 ++++++++[>+>++++<<-]>++>>
       
   285 +<[-[>>+<<-]+>>]>+[-<<<[-
       
   286 >[+[-]+>++>>>-<<]<[<]>>++
       
   287 ++++[<<+++++>>-]+<<++.[-]
       
   288 <<]>.>+[>>]>+]
       
   289 \end{lstlisting}
       
   290 \end{bubble}
       
   291 \end{textblock}
       
   292   
       
   293 \end{frame}
   442 \end{frame}
   294 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   443 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   295 
   444 
   296 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
       
   297 
       
   298 \begin{frame}[c]
       
   299 \frametitle{Marks for CW6 (Part 1 + 2)}
       
   300 
       
   301 Raw marks:
       
   302 
       
   303 \begin{itemize}
       
   304 \item 6\%: 154 students
       
   305 \item 5\%: 66
       
   306 \item 4\%: 18
       
   307 \item 3\%: 13
       
   308 \item 2\%: 2
       
   309 \item 1\%: 1
       
   310 \item 0\%: 21 
       
   311 \end{itemize}  
       
   312 \end{frame}
       
   313 
       
   314 
       
   315 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   316 
       
   317 \end{document}
       
   318 
   445 
   319 
   446 
   320 \end{document}
   447 \end{document}
   321 
   448 
   322 %%% Local Variables:  
   449 %%% Local Variables: