slides/slides04.tex
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 02 Nov 2023 13:53:37 +0000
changeset 474 b528d1d3d3c3
parent 449 d67c5f7177a6
child 481 e03a0100ec46
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
     1
% !TEX program = xelatex
449
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
     2
\documentclass[dvipsnames,14pt,t,xelatex,aspectratio=169,xcolor={table}]{beamer}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
     3
\usepackage{../styles/slides}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
     4
\usepackage{../styles/mygraphs}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
     5
\usepackage{../styles/langs}
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
     6
%%\usepackage{../data}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
     7
\usepackage[export]{adjustbox}
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
     8
\usetikzlibrary{shapes}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
\hfuzz=220pt 
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
%\setmonofont[Scale=.88]{Consolas}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
%\newfontfamily{\consolas}{Consolas}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
\lstset{language=Scala,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
        style=mystyle,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
        numbersep=0pt,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
        numbers=none,
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
        xleftmargin=0mm}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    21
\newcommand{\LEFTarrow}[3]{%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    22
\begin{textblock}{0}(#2,#3)%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    23
\onslide<#1>{%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    24
\begin{tikzpicture}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    25
\node at (0,0) [single arrow, shape border rotate=180, fill=red,text=red]{a};%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    26
\end{tikzpicture}}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    27
\end{textblock}}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    28
\newcommand{\DOWNarrow}[3]{%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    29
\begin{textblock}{0}(#2,#3)%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    30
\onslide<#1>{%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    31
\begin{tikzpicture}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    32
\node at (0,0) [single arrow, shape border rotate=270, fill=red,text=red]{a};%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    33
\end{tikzpicture}}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    34
\end{textblock}}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    35
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    36
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
\newcommand{\bl}[1]{\textcolor{blue}{#1}}     
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
% beamer stuff 
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
    40
\renewcommand{\slidecaption}{PEP (Scala) 04, King's College London}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    42
% Swift, example (a*)*b  
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    43
\begin{filecontents}{re-swift.data}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    44
5   0.001
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    45
10  0.001
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    46
15  0.009
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    47
20  0.178
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    48
23  1.399
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    49
24  2.893
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    50
25  5.671
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    51
26  11.357
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    52
27  22.430
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    53
\end{filecontents}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    54
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    55
% Dart, example (a*)*b  
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    56
\begin{filecontents}{re-dart.data}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    57
20 0.042
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    58
21 0.084
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    59
22 0.190
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    60
23 0.340
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    61
24 0.678
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    62
25 1.369
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    63
26 2.700
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    64
27 5.462
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    65
28 10.908
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    66
29 21.725
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    67
30 43.492
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    68
\end{filecontents}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    69
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
    70
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    71
\begin{filecontents}{re3a.data}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    72
1 0.00003
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    73
500001 0.22527
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    74
1000001 0.62752
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    75
1500001 0.88485
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    76
2000001 1.39815
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    77
2500001 1.68619
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    78
3000001 1.94957
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    79
3500001 2.15878
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    80
4000001 2.59918
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    81
4500001 5.90679
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    82
5000001 13.11295
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    83
5500001 19.15376
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    84
6000001 40.16373
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    85
\end{filecontents}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    86
\begin{filecontents}{re-python2.data}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    87
1 0.033
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    88
5 0.036
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    89
10 0.034
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    90
15 0.036
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    91
18 0.059
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    92
19 0.084
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    93
20 0.141
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    94
21 0.248
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    95
22 0.485
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    96
23 0.878
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    97
24 1.71
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    98
25 3.40
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
    99
26 7.08
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   100
27 14.12
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   101
28 26.69
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   102
\end{filecontents}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   103
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   104
\begin{filecontents}{re-js.data}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   105
5   0.061
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   106
10  0.061
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   107
15  0.061
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   108
20  0.070
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   109
23  0.131
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   110
25  0.308
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   111
26  0.564
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   112
28  1.994
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   113
30  7.648
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   114
31  15.881 
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   115
32  32.190
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   116
\end{filecontents}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   117
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   118
\begin{filecontents}{re-java.data}
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   119
5  0.00298
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   120
10  0.00418
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   121
15  0.00996
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   122
16  0.01710
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   123
17  0.03492
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   124
18  0.03303
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   125
19  0.05084
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   126
20  0.10177
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   127
21  0.19960
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   128
22  0.41159
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   129
23  0.82234
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   130
24  1.70251
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   131
25  3.36112
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   132
26  6.63998
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   133
27  13.35120
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   134
28  29.81185
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   135
\end{filecontents}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   137
\begin{filecontents}{re-java9.data}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   138
1000  0.01410
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   139
2000  0.04882
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   140
3000  0.10609
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   141
4000  0.17456
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   142
5000  0.27530
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   143
6000  0.41116
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   144
7000  0.53741
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   145
8000  0.70261
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   146
9000  0.93981
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   147
10000 0.97419
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   148
11000 1.28697
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   149
12000 1.51387
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   150
14000 2.07079
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   151
16000 2.69846
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   152
20000 4.41823
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   153
24000 6.46077
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   154
26000 7.64373
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   155
30000 9.99446
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   156
34000 12.966885
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   157
38000 16.281621
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   158
42000 19.180228
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   159
46000 21.984721
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   160
50000 26.950203
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   161
60000 43.0327746
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   162
\end{filecontents}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   163
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   164
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   165
\begin{document}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   166
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   167
\begin{frame}[t]
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   168
\frametitle{%
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   169
  \begin{tabular}{@ {}c@ {}}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   170
  \\[5mm]
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   171
  \huge PEP Scala (4) 
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   172
  \end{tabular}}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   173
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   174
  \normalsize
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   175
  \begin{center}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   176
  \begin{tabular}{ll}
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   177
    Email:  & christian.urban at kcl.ac.uk\\
416
497f67fd4ae0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 379
diff changeset
   178
    %Office: & N\liningnums{7.07} (North Wing, Bush House)\bigskip\\
497f67fd4ae0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 379
diff changeset
   179
    Slides \& Code: & KEATS\bigskip\\
449
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   180
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   181
    Office Hour: &  Fridays 11:00 -- 12:00\\
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   182
    Location: & N7.07 (North Wing, Bush House)\bigskip\\
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   183
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   184
    Pollev: & \texttt{\alert{https://pollev.com/cfltutoratki576}}\\  \\
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   185
  \end{tabular}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   186
  \end{center}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   187
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   188
\end{frame}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   189
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   190
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   191
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
449
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   192
%\begin{frame}[c]
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   193
%\frametitle{Hints in CW}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   194
%
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   195
%\begin{center}  
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   196
%\includegraphics[scale=0.4]{../pics/hints.png}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   197
%\end{center}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   198
%
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   199
%\small
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   200
%\begin{itemize}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   201
%  \item Scala Library, e.g.~\texttt{span} in \\
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   202
%  \url{https://www.scala-lang.org/api/current/scala/collection/immutable/List.html}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   203
%\end{itemize}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   204
%\end{frame}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   205
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   206
  
326
e5453add7df6 updated
Christian Urban <urbanc@in.tum.de>
parents: 325
diff changeset
   207
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
449
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   208
%\begin{frame}[c]
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   209
%\frametitle{Discussion Forum}
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   210
449
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   211
%\begin{center}  
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   212
%\includegraphics[scale=0.38]{/Users/cu/discussion.png}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   213
%\end{center}
326
e5453add7df6 updated
Christian Urban <urbanc@in.tum.de>
parents: 325
diff changeset
   214
449
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   215
%\end{frame}
326
e5453add7df6 updated
Christian Urban <urbanc@in.tum.de>
parents: 325
diff changeset
   216
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   217
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   218
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   219
% \begin{frame}[c]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   220
% \frametitle{Preliminary 7}
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   221
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   222
% Raw marks (261 submissions):\bigskip
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   223
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   224
% \begin{itemize}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   225
% \item 4\%: \hspace{4mm}236
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   226
% \item 3\%: \hspace{4mm}10
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   227
% \item 2\%: \hspace{4mm}1
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   228
% \item 1\%: \hspace{4mm}0
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   229
% \item 0\%: \hspace{4mm}15 
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   230
% \end{itemize}\bigskip\bigskip  
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   231
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   232
% \footnotesize
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   233
% (plagiarism/collusion interviews ongoing!)
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   234
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   235
% \end{frame}
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   236
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   237
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   238
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   239
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   240
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   241
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   242
% \begin{frame}[c,fragile]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   243
% \small
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   244
  
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   245
% \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=1mm]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   246
% def is_legal(dim: Int, p: Path, x: Pos) = {
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   247
%   if (...some_really_long_condition...) false
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   248
%   else true
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   249
% }
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   250
% \end{lstlisting}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   251
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   252
% \pause
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   253
% \bigskip
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   254
% \rule{11cm}{0.3mm}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   255
% \bigskip
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   256
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   257
% \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=1mm]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   258
% def is_legal(dim: Int, p: Path, x: Pos) = 
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   259
%   !(...some_really_long_condition...)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   260
% \end{lstlisting}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   261
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   262
% \end{frame}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   263
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   264
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   265
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   266
% \begin{frame}[c,fragile]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   267
% \small
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   268
  
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   269
% \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=1mm]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   270
% def foobar(...) = {
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   271
%   val cs = for (c <- str) yield c.toLowerCase
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   272
%   ...
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   273
% }
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   274
% \end{lstlisting}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   275
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   276
% \pause
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   277
% \bigskip
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   278
% \rule{11cm}{0.3mm}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   279
% \bigskip
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   280
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   281
% \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=1mm]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   282
% def foobar(...) = {
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   283
%   val cs = str.map(_.toLowerCase)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   284
%   ...
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   285
% }
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   286
% \end{lstlisting}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   287
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   288
% \end{frame}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   289
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   290
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   291
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   292
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   293
% \begin{frame}[c,fragile]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   294
% \small
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   295
  
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   296
% \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-7mm]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   297
% def RomanNumeral2Int(rs: RomanNumeral): Int = 
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   298
%  rs match { 
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   299
%    case Nil => 0
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   300
%    case M::r    => 1000 + RomanNumeral2Int(r)  
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   301
%    case C::M::r => 900 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   302
%    case D::r    => 500 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   303
%    case C::D::r => 400 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   304
%    case C::r    => 100 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   305
%    case X::C::r => 90 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   306
%    case L::r    => 50 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   307
%    case X::L::r => 40 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   308
%    case X::r    => 10 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   309
%    case I::X::r => 9 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   310
%    case V::r    => 5 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   311
%    case I::V::r => 4 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   312
%    case I::r    => 1 + RomanNumeral2Int(r)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   313
%  }
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   314
% \end{lstlisting}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   315
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   316
% \end{frame}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   317
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   318
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   319
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   320
\begin{frame}[c,fragile]
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   321
\frametitle{Last Week: Pattern Matching} 
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   322
\small
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   323
  
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   324
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=3mm]
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   325
def fizz_buzz(n: Int) : String = 
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   326
  (n % 3, n % 5) match {
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   327
    case (0, 0) => "fizz buzz"
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   328
    case (0, _) => "fizz"
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   329
    case (_, 0) => "buzz"
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   330
    case _ => n.toString  
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   331
  }
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   332
\end{lstlisting}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   333
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   334
\end{frame}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   335
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   336
449
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   337
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   338
\begin{frame}[c,fragile]
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   339
\frametitle{Last Week: Pattern Matching} 
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   340
\small
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   341
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   342
\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=3mm]
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   343
def mkeps(r: Rexp) : Val = r match {
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   344
  case ONE => Empty
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   345
  case ALT(r1, r2) => ...
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   346
  case SEQ(r1, r2) => ...
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   347
  case STAR(r) => ...
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   348
  case RECD(x, r1) => Rec(x, mkeps(r))
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   349
  ...
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   350
}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   351
\end{lstlisting}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   352
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   353
\end{frame}
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   354
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   355
d67c5f7177a6 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 418
diff changeset
   356
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   357
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   358
\begin{frame}[c,fragile]
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   359
\frametitle{Reverse Polish Notation}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   360
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   361
{\Large\bl{$(3 + 1) * (2 + 9)$}}\bigskip
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   362
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   363
{\Large$\Rightarrow$}\bigskip
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   364
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   365
{\;\;\Large\bl{$3\;\;1\;+\;2\;\;9\;+\;*$}}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   366
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   367
\begin{textblock}{3}(11,4)
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   368
\begin{onlyenv}<2>
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   369
\begin{lstlisting}[language=JVMIS]
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   370
ldc 3
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   371
ldc 1
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   372
iadd
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   373
ldc 2
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   374
ldc 9
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   375
iadd
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   376
imul
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   377
\end{lstlisting}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   378
\end{onlyenv} 
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   379
\end{textblock}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   380
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   381
\end{frame}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   382
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   383
 
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   384
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   385
% \begin{frame}[c,fragile]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   386
% \frametitle{Sudoku}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   387
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   388
% A very simple-minded version on 110 problems:\bigskip
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   389
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   390
% \begin{itemize}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   391
% \item 1 core: 800 secs
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   392
% \item 2 cores: 400 secs
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   393
% \item 8 cores: 290 secs
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   394
% \item 18 cores: 142 secs
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   395
% \end{itemize}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   396
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   397
% \end{frame}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   398
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   399
 
155
371acb50643d updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   400
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   401
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   402
% \begin{frame}[t]
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   403
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   404
%   \begin{center}  
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   405
%   \includegraphics[scale=0.3]{../pics/blow.png}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   406
%   \end{center}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   407
  
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   408
%   \begin{textblock}{14}(2,11.4)
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   409
%   \large\bf{}Mind-Blowing Regular Expressions:\\ 
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   410
%   \centering in Python, JavaScript, Java
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   411
%   \end{textblock}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   412
% \end{frame}
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   413
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   414
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   415
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   416
\begin{frame}[c,fragile]
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   417
\frametitle{Regular Expressions} 
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   418
  
326
e5453add7df6 updated
Christian Urban <urbanc@in.tum.de>
parents: 325
diff changeset
   419
Suppose you have the regular expression 
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   420
\only<1-3>{\alert{\texttt{(a*)b}}}%
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   421
\only<4->{\alert{\texttt{(a*)*b}}} :\bigskip
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   422
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   423
\begin{center}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   424
\only<1>{\code{"aaaaaaaaaaaaaaab"}}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   425
\only<2>{\code{"aaaaa...........aaaaaaaaaaaaaaaaaaaab"}}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   426
\only<3>{\code{"aaaaa...........aaaaaaaaaaaaaaaaaaaa"}}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   427
\only<4>{\code{"aaaaa...........aaaaaaaaaaaaaaaaaaaab"}}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   428
\only<5->{\code{"aaaaa...........aaaaaaaaaaaaaaaaaaaa"}}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   429
\end{center}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   430
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   431
\only<6>{
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   432
\begin{textblock}{13}(5,12)
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   433
How long does Python need to find out?
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   434
\end{textblock}}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   435
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   436
\end{frame}
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   437
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   438
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   439
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   440
\begin{frame}<1>[c]
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   441
  \frametitle{Main 3: Regexes}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   442
  
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   443
\begin{center}
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   444
  \mbox{Graphs: regex \alert{\texttt{(a*)*b}} and strings $\underbrace{\;\texttt{a}\ldots \texttt{a}\;}_{n}$}\bigskip
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   445
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   446
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   447
  \small  
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   448
\begin{tabular}[t]{@{\hspace{-8mm}}c@{\hspace{-0mm}}c@{}}
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   449
\only<1>{\raisebox{6mm}{\begin{tikzpicture}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   450
\begin{axis}[
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   451
    xlabel={$n$},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   452
    x label style={at={(1.05,0.0)}},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   453
    ylabel={time in secs},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   454
    enlargelimits=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   455
    xtick={0,5,...,30},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   456
    xmax=33,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   457
    ymax=35,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   458
    ytick={0,5,...,30},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   459
    scaled ticks=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   460
    axis lines=left,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   461
    width=5.5cm,
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   462
    height=5cm,
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   463
    legend entries={Java 8,Python,JavaScript,Swift,Dart},
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   464
    %legend entries={\small{}Python,  \small{}Java 8,  \small{}JavaScript},  
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   465
    legend pos=north west,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   466
    legend cell align=left]
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   467
\addplot[blue,mark=*, mark options={fill=white}] table {re-python2.data};  
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   468
\addplot[cyan,mark=*, mark options={fill=white}] table {re-java.data};
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   469
\addplot[red,mark=*, mark options={fill=white}] table {re-js.data};
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   470
\addplot[magenta,mark=*, mark options={fill=white}] table {re-swift.data};
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   471
\addplot[brown,mark=*, mark options={fill=white}] table {re-dart.data};
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   472
\end{axis}
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   473
\end{tikzpicture}}}%
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   474
\only<2>{\raisebox{0mm}{\begin{tikzpicture}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   475
\begin{axis}[
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   476
    xlabel={$n$},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   477
    x label style={at={(1.05,0.0)}},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   478
    ylabel={time in secs},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   479
    %y label style={at={(0.06,0.5)}},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   480
    enlargelimits=false,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   481
    %xtick={0,30000,...,60000},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   482
    xmax=65000,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   483
    ymax=35,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   484
    ytick={0,5,...,30},
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   485
    scaled ticks=true,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   486
    axis lines=left,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   487
    width=5.5cm,
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   488
    height=5cm, 
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   489
    legend entries={\small{}Java 9},  
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   490
    legend pos=north west]
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   491
\addplot[cyan,mark=*, mark options={fill=white}] table {re-java9.data};
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   492
\end{axis}
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   493
\end{tikzpicture}}}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   494
  &
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   495
\onslide<1-2>{\begin{tikzpicture}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   496
  \begin{axis}[
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   497
    xlabel={$n$},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   498
    x label style={at={(1.05,0.0)}},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   499
    ylabel={time in secs},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   500
    enlargelimits=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   501
    ymax=35,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   502
    ytick={0,5,...,30},
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   503
    axis lines=left,
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   504
    legend entries={You in M3}, 
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   505
    %%scaled ticks=false,
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   506
    width=5.5cm, 
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   507
    height=5cm]
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   508
%%\addplot[green,mark=square*,mark options={fill=white}] table {re2a.data};    
222
e52cc402caee updated
Christian Urban <urbanc@in.tum.de>
parents: 217
diff changeset
   509
\addplot[magenta,mark=square*,mark options={fill=white}] table {re3a.data};
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   510
\end{axis}
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   511
\end{tikzpicture}}
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   512
\end{tabular}
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   513
\end{center}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   514
68
8da9e0c16194 updated
Christian Urban <urbanc@in.tum.de>
parents: 67
diff changeset
   515
\hfill\small\url{https://vimeo.com/112065252}
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   516
\end{frame}
325
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   517
ca9c1cf929fa updated
Christian Urban <urbanc@in.tum.de>
parents: 229
diff changeset
   518
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67
ca5884c2e3bd updated
Christian Urban <urbanc@in.tum.de>
parents: 66
diff changeset
   519
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   520
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   521
\begin{frame}[c,fragile]
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   522
\small
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   523
\textcolor{red}{MacOSX}\medskip
70
6024381415cb updated
Christian Urban <urbanc@in.tum.de>
parents: 68
diff changeset
   524
418
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   525
\begin{minipage}{13cm}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   526
  \begin{itemize}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   527
  \item[0)] (if needed) \texttt{brew install java} \;\;or\;\; \texttt{brew reinstall java}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   528
  \item[1)] \texttt{curl -s "https://get.sdkman.io" | bash}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   529
  \item[2)] \texttt{sdk install scala 2.13.7}  
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   530
  \end{itemize}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   531
\end{minipage}\bigskip
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   532
  
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   533
\textcolor{red}{Windows / Linux Ubuntu}\medskip
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   534
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   535
\begin{minipage}{13cm}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   536
  \begin{itemize}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   537
  \item[0)] (if needed) \texttt{sudo apt-get remove scala-library scala}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   538
  \item[1)] {\fontsize{8.5}{8.5}\selectfont\texttt{sudo wget https://downloads.lightbend.com/scala/2.13.7/scala-2.13.7.deb}}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   539
  \item[2)] \texttt{sudo dpkg -i scala-2.13.7.deb}  
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   540
  \end{itemize}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   541
\end{minipage}\bigskip
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   542
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   543
\begin{minipage}{13cm}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   544
other Linux distros: \texttt{sudo apt-get scala}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   545
\end{minipage}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   546
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   547
\end{frame}
fa7f7144f2bb updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   548
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   549
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   550
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   551
\end{document}
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   552
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   553
%%% Local Variables:  
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   554
%%% mode: latex
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   555
%%% TeX-master: t
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   556
%%% End: 
3506b681c191 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   557