slides/slides01.tex
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 06 Nov 2023 14:18:26 +0000
changeset 477 a4e1f63157d8
parent 443 80c691a4caab
child 481 e03a0100ec46
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
308
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
     1
% !TEX program = xelatex
352
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
     2
\documentclass[dvipsnames,14pt,t,xelatex,aspectratio=169,xcolor={table}]{beamer}
442
c86e7dd198bf updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 427
diff changeset
     3
\usepackage{../styles/slides}
c86e7dd198bf updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 427
diff changeset
     4
\usepackage{../styles/mygraphs}
c86e7dd198bf updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 427
diff changeset
     5
\usepackage{../styles/langs}
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
%\usepackage{../data}
442
c86e7dd198bf updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 427
diff changeset
     7
\usetikzlibrary{shapes} 
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
442
c86e7dd198bf updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 427
diff changeset
     9
\hfuzz=220pt  
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
%\setmonofont[Scale=.88]{Consolas}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
%\newfontfamily{\consolas}{Consolas}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
\lstset{language=Scala,
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
        style=mystyle,
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
        numbersep=0pt,
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
        numbers=none,
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
        xleftmargin=0mm}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
353
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    20
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    21
\colorlet{punct}{red!60!black}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    22
\definecolor{background}{HTML}{EEEEEE}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    23
\definecolor{delim}{RGB}{20,105,176}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    24
\colorlet{numb}{magenta!60!black}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    25
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    26
\lstdefinelanguage{json}{
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    27
    basicstyle=\normalfont\ttfamily,
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    28
    numbers=left,
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    29
    numberstyle=\scriptsize,
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    30
    stepnumber=1,
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    31
    %numbersep=8pt,
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    32
    showstringspaces=false,
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    33
    breaklines=true,
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    34
    %frame=lines,
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    35
    %backgroundcolor=\color{background},
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    36
    literate=
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    37
     *{0}{{{\color{numb}0}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    38
      {1}{{{\color{numb}1}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    39
      {2}{{{\color{numb}2}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    40
      {3}{{{\color{numb}3}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    41
      {4}{{{\color{numb}4}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    42
      {5}{{{\color{numb}5}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    43
      {6}{{{\color{numb}6}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    44
      {7}{{{\color{numb}7}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    45
      {8}{{{\color{numb}8}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    46
      {9}{{{\color{numb}9}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    47
      {:}{{{\color{punct}{:}}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    48
      {,}{{{\color{punct}{,}}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    49
      {\{}{{{\color{delim}{\{}}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    50
      {\}}{{{\color{delim}{\}}}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    51
      {[}{{{\color{delim}{[}}}}{1}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    52
      {]}{{{\color{delim}{]}}}}{1},
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    53
}     
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
    54
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    55
\newcommand{\bl}[1]{\textcolor{blue}{#1}}    
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    56
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    57
\newcommand{\RIGHTarrow}[3]{%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    58
\begin{textblock}{0}(#2,#3)%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    59
\onslide<#1>{%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    60
\begin{tikzpicture}%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    61
\node at (0,0) [single arrow, shape border rotate=0, fill=red,text=red]{a};%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    62
\end{tikzpicture}}%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    63
\end{textblock}}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    64
\newcommand{\LEFTarrow}[3]{%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    65
\begin{textblock}{0}(#2,#3)%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    66
\onslide<#1>{%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    67
\begin{tikzpicture}%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    68
\node at (0,0) [single arrow, shape border rotate=180, fill=red,text=red]{a};%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    69
\end{tikzpicture}}%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    70
\end{textblock}}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    71
\newcommand{\DOWNarrow}[3]{%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    72
\begin{textblock}{0}(#2,#3)%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    73
\onslide<#1>{%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    74
\begin{tikzpicture}%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    75
\node at (0,0) [single arrow, shape border rotate=270, fill=red,text=red]{a};%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    76
\end{tikzpicture}}%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
    77
\end{textblock}}
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    78
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
% beamer stuff 
195
fc3ac7b70a06 updated
Christian Urban <urbanc@in.tum.de>
parents: 174
diff changeset
    80
\renewcommand{\slidecaption}{PEP (Scala) \liningnums{01}, King's College London}
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
334
841727e27252 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 314
diff changeset
    82
% https://insights.stackoverflow.com/survey/2019#technology-most-loved-dreaded-and-wanted
841727e27252 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 314
diff changeset
    83
841727e27252 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 314
diff changeset
    84
% processors in the future / Ahmdahl law
841727e27252 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 314
diff changeset
    85
% https://www.youtube.com/watch?v=_9mzmvhwMqw
841727e27252 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 314
diff changeset
    86
352
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
    87
\setbeamertemplate{itemize items}{$\bullet$}
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
    88
\setbeamertemplate{itemize subitem}{$\bullet$}
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
    89
\setbeamertemplate{itemize subsubitem}{$\bullet$}
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
    90
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
    91
\usepackage{tcolorbox}
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
    92
\newtcolorbox{mybox}{colback=red!5!white,colframe=red!75!black}
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
    93
\newtcolorbox{mybox2}[1]{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,title=#1}
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
    94
\newtcolorbox{mybox3}[1]{colback=Cyan!5!white,colframe=Cyan!75!black,fonttitle=\bfseries,title=#1}
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
\begin{document}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
\begin{frame}[t]
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
\frametitle{%
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
  \begin{tabular}{@ {}c@ {}}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
  \\[5mm]
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   103
  \hspace{7mm}\huge PEP Scala (\liningnums{1}) 
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   104
  \end{tabular}}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
  \normalsize
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
  \begin{center}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
  \begin{tabular}{ll}
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   109
    Email:  & christian.urban at kcl.ac.uk\\
353
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   110
    %Office: & N\liningnums{7.07} (North Wing, Bush House)\bigskip\\
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   111
    Slides \& Code: & KEATS\bigskip\\
442
c86e7dd198bf updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 427
diff changeset
   112
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   113
    Office Hour: &  Fridays 13:00 -- 14:00\\
442
c86e7dd198bf updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 427
diff changeset
   114
    Location: & N7.07 (North Wing, Bush House)\bigskip\\
c86e7dd198bf updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 427
diff changeset
   115
c86e7dd198bf updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 427
diff changeset
   116
    Pollev: & \texttt{\alert{https://pollev.com/cfltutoratki576}}\\  \\
353
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   117
    %Additionally: & (for Scala) Tuesdays 10:45 -- 11:45\\ 
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   118
  \end{tabular}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   119
  \end{center}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   120
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   121
  %\tiny
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   122
  %developed since 2004 bv Martin Odersky
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   123
  %picture about assignments
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   124
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   125
\begin{textblock}{6}(0.5,0.5)
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   126
\includegraphics[scale=0.035]{../pics/assign.jpg}\\[-1mm]
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   127
\end{textblock}
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   128
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   129
\end{frame}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   130
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   131
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   132
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   133
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   134
\begin{frame}[c]
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   135
\frametitle{Why Scala?}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   136
352
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   137
\begin{textblock}{6}(3,3)
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   138
\begin{tabular}{l}
442
c86e7dd198bf updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 427
diff changeset
   139
%%\mbox{}\hspace{-1mm}\includegraphics[scale=0.36]{../pics/twitter.png}\\[-1mm]
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   140
\includegraphics[scale=0.30]{../pics/linked.png}\\
141
822adb464c90 updated
Christian Urban <urbanc@in.tum.de>
parents: 140
diff changeset
   141
\includegraphics[scale=0.30]{../pics/guardian.jpg}\\[-3mm]
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   142
\mbox{}\hspace{-2mm}\includegraphics[scale=0.38]{../pics/morgan.png}\\[-3mm]
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   143
\includegraphics[scale=0.30]{../pics/suisse.png}\\
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   144
Standard \& Poor's\\  
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   145
{\large\bf ...}
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   146
\end{tabular}
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   147
\end{textblock}
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   148
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   149
\begin{textblock}{6}(8,3)
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   150
\begin{tabular}{l}
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   151
\includegraphics[scale=0.20]{../pics/edf.png}\\[-1mm]
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   152
\includegraphics[scale=0.08]{../pics/novell.png}\\[-1mm]
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   153
\includegraphics[scale=0.30]{../pics/foursquare.png}\\
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   154
\includegraphics[scale=0.30]{../pics/hsbc.png}\\
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   155
{\large\bf ...}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   156
\end{tabular}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   157
\end{textblock}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   158
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   159
\begin{textblock}{6}(11,3)
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   160
\begin{tabular}{l}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   161
\includegraphics[scale=0.08]{../pics/lichess.png}\\[-1mm]
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   162
{\footnotesize  lichess engine (open source)}  
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   163
\end{tabular}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   164
\end{textblock}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   165
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   166
352
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   167
\begin{textblock}{12}(2,11)
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   168
  \footnotesize
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   169
  \begin{mybox3}{A former student working now at Quantexa:}\it
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   170
    ``I am a former student. I graduated last year. I got my dream job
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   171
    as a backend Scala developer. Most of the Scala I know is from PEP
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   172
    2018/19. My interviewers said they expect code of a lesser quality
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   173
    even from people with one year of experience.''
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   174
\end{mybox3}
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   175
\end{textblock}  
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   176
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   177
\end{frame}
443
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   178
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   179
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
443
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   180
\begin{frame}[c]
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   181
443
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   182
\begin{textblock}{12}(2,2)
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   183
  \small
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   184
  \begin{mybox3}{}\it
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   185
    ``I am currently working as a software engineer at Morgan Stanley
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   186
whilst doing my year-in-industry and am using Scala in the
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   187
workplace. My team were impressed that I could already program in the
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   188
language and even had knowledge of other functional languages. They
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   189
told me that most university students are not taught such languages.''
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   190
\smallskip\newline
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   191
\mbox{}\hfill{}-- Sumaiya Mohbubul 2021/22
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   192
\end{mybox3}
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   193
\end{textblock} 
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   194
  
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   195
\begin{textblock}{12}(2,9)
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   196
  \small
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   197
  \begin{mybox3}{}\it
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   198
    ``PEP was my favourite module so far during these 2 years. It motivated
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   199
me to apply and get a summer internship offer at S\&P Global as a Scala
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   200
developer. The module content was more than enough for me to start
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   201
working on the projects here at the company.''\smallskip\newline
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   202
\mbox{}\hfill{}-- Szabolcs Nagy 2021/22
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   203
\end{mybox3}
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   204
\end{textblock}    
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   205
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   206
\end{frame}
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   207
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   208
80c691a4caab updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 442
diff changeset
   209
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
352
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   210
%\begin{textblock}{6}(2,12)
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   211
%\begin{bubble}[9.4cm]
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   212
%  \small
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   213
%  developed since 2004 by Martin Odersky
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   214
%  (he was behind Generic Java which was included in Java 5
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   215
%  \ldots I am using Scala since maybe 2008?)
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   216
%\end{bubble}
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   217
%\end{textblock}
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   218
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   219
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   220
\begin{frame}[c]
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   221
\frametitle{Why Scala?}
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   222
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   223
\begin{itemize}
34
40424bbe109e updated
Christian Urban <urbanc@in.tum.de>
parents: 33
diff changeset
   224
\item compiles to the JVM\\
40424bbe109e updated
Christian Urban <urbanc@in.tum.de>
parents: 33
diff changeset
   225
  \textcolor{gray}{(also JavaScript, native X86 in the works)}\medskip
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   226
\item integrates seamlessly with Java\medskip
352
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   227
\item combines \underline{\bf functional} and {\bf object-oriented} programming\medskip
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   228
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   229
\item no pointers, no null
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   230
%\item it is a bit on the ``theory'' / ``mathematical'' side\\
97bcf8efe4e0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 334
diff changeset
   231
%  \textcolor{gray}{(no pointers, no \texttt{null}, but expressions)}
34
40424bbe109e updated
Christian Urban <urbanc@in.tum.de>
parents: 33
diff changeset
   232
  
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   233
\item often one can write very concise and elegant code
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   234
\end{itemize}\bigskip\medskip  
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   235
308
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
   236
%\small
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
   237
%alternatives:\\
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
   238
%Elm, Haskell, Ocaml, F$\sharp$, Erlang, ML, Lisp (Racket), \ldots
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   239
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   240
\end{frame}
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   241
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   242
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   243
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
308
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
   244
\begin{frame}[t]
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   245
\frametitle{Java vs Scala}
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   246
308
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
   247
{\lstset{language=java,numbers=right}\fontsize{12}{12}\selectfont
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   248
\texttt{\lstinputlisting{Point.java}}}
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   249
308
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
   250
\rule{11cm}{0.3mm}\\[-3mm]
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   251
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   252
{\lstset{language=scala}\fontsize{12}{12}\selectfont
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   253
\texttt{\lstinputlisting{Point.scala}}}
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   254
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   255
\begin{textblock}{6}(13,3)
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   256
\textbf{\large Java}
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   257
\end{textblock}
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   258
308
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
   259
\begin{textblock}{6}(13,14.3)
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   260
\textbf{\large Scala}
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   261
\end{textblock}  
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   262
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   263
\end{frame}
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   264
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   265
174
90e0b1cc460b updated
Christian Urban <urbanc@in.tum.de>
parents: 142
diff changeset
   266
90e0b1cc460b updated
Christian Urban <urbanc@in.tum.de>
parents: 142
diff changeset
   267
90e0b1cc460b updated
Christian Urban <urbanc@in.tum.de>
parents: 142
diff changeset
   268
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
90e0b1cc460b updated
Christian Urban <urbanc@in.tum.de>
parents: 142
diff changeset
   269
\begin{frame}[c]
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   270
\frametitle{First Steps: \textcolor{red}{Scala 3} Tools}
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   271
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   272
\mbox{}\\
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   273
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   274
\begin{minipage}{1.1\textwidth}
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   275
\begin{itemize}
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   276
\item contains a REPL $\Rightarrow$ but this year we use
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   277
  \textcolor{red}{\texttt{scala-cli}}  
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   278
\item I use VS Codium and a Scala extension (M'place)
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   279
\begin{center}  
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   280
\includegraphics[scale=0.10]{../pics/vscode.png}\\[-10mm]\mbox{}
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   281
\end{center}\bigskip
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 195
diff changeset
   282
  
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   283
\item there is a plugin for Eclipse (called Scala IDE)\medskip
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   284
\item there is also a plugin for IntelliJ\medskip
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   285
\end{itemize}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   286
\end{minipage}
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   287
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   288
\end{frame}
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   289
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   290
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   291
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
353
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   292
\begin{frame}[c, fragile]
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   293
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   294
\small  
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   295
My personal keboard shortcut for VS Code\\
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   296
(in keybindings.json)\bigskip
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   297
360
e45d2890749d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 359
diff changeset
   298
\footnotesize
e45d2890749d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 359
diff changeset
   299
\begin{lstlisting}[language=json,numbers=none,xrightmargin=-4cm]
353
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   300
[
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   301
    {
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   302
        "key": "ctrl+enter",
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   303
        "command": "workbench.action.terminal.runSelectedText",
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   304
        "when": "editorTextFocus && editorHasSelection"
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   305
      }
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   306
]      
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   307
\end{lstlisting}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   308
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   309
  
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   310
\end{frame}
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   311
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   312
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   313
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   314
\begin{frame}[c, fragile]
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   315
\frametitle{This year Scala 3/ \textbf{\texttt{scala-cli}}}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   316
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   317
\mbox{}\\
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   318
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   319
\begin{minipage}{1.3\textwidth}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   320
\begin{center}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   321
\textbf{\texttt{scala-cli}}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   322
$\quad\Rightarrow$ {\small\url{https://scala-cli.virtuslab.org/}}\bigskip
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   323
\end{center}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   324
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   325
Installation problems:
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   326
\begin{itemize}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   327
\item Oscar Sjostedt (\texttt{\small{}oscar.sjostedt@kcl.ac.uk})
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   328
\item Nicole Lehchevska (\texttt{\small{}nicole.lehchevska@kcl.ac.uk})\bigskip
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   329
\end{itemize}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   330
Github problems:
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   331
\begin{itemize}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   332
\item Quan Tran (\texttt{\small{}anh.tran@kcl.ac.uk})\bigskip
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   333
\end{itemize}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   334
Discussion forum:
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   335
\begin{itemize}  
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   336
\item Ruben Ticehurst-James (\texttt{\small{}ruben.ticehurst-james@kcl.ac.uk})  
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   337
\end{itemize}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   338
\end{minipage}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   339
  
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   340
\end{frame}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   341
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   342
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   343
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   344
353
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   345
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   346
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   347
\begin{frame}[t]
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   348
\frametitle{Why Scala?}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   349
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   350
\only<2-4>{%
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   351
\begin{center} 
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   352
{\large\bf{}Money?}\bigskip\\  
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   353
\begin{tabular}{@{}c@{}c@{}}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   354
\includegraphics[scale=0.2]{../pics/salary1.png} &
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   355
\includegraphics[scale=0.2]{../pics/salary2.png}\\
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   356
\multicolumn{2}{r@{}}{\footnotesize$^*$ source: Stackoverflow Developer Survey, 2019}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   357
\end{tabular}  
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   358
\end{center}
353
bb6074814a73 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 352
diff changeset
   359
\RIGHTarrow{2}{2.0}{6.3}
314
21b52310bd8b updated
Christian Urban <urbanc@in.tum.de>
parents: 309
diff changeset
   360
\DOWNarrow{2}{10.1}{4.4}
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   361
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   362
\small
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   363
Elm, Rust, Haskell, Ocaml, F$\#$, Erlang, ML, Lisp (Racket)\ldots 
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   364
}
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   365
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   366
\only<3>{
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   367
\begin{textblock}{2}(7.5,6.7)
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   368
\includegraphics[scale=0.2]{../pics/salary3.png}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   369
\end{textblock}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   370
\RIGHTarrow{2}{2.0}{6.3}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   371
\DOWNarrow{2}{10.1}{4.4}}
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   372
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   373
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   374
\only<4>{
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   375
\begin{textblock}{6}(3.3,6.2)
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   376
\begin{bubble}[6.5cm]
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   377
\bf\huge\textcolor{RoyalBlue}{Functional Programming!}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   378
\end{bubble}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   379
\end{textblock}}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   380
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   381
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   382
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   383
\end{frame}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   384
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   385
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   386
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   387
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   388
\begin{frame}[c]
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   389
  \frametitle{\begin{tabular}{c}\\[2mm]
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   390
  Why Functional\\[-2mm] Programming?\end{tabular}
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   391
}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   392
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   393
  %
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   394
  \mbox{}\\[3.5cm]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   395
  \small
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   396
Elm, Haskell, Ocaml, F$\#$, Erlang, ML, Lisp (Racket)\ldots 
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   397
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   398
\only<2>{
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   399
\begin{textblock}{8}(1.3,6.2)
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   400
\begin{bubble}[12cm]
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   401
\normalsize\it``If you want to see which features will be in mainstream programming
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   402
  languages tomorrow, then take a look at functional programming
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   403
  languages today.''\medskip\small\\
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   404
  \hfill{}---Simon Peyton Jones (works at Epic Games, used to work at Microsoft)\\
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   405
  \hfill{}main developer of the Glasgow Haskell Compiler
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   406
\end{bubble}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   407
\end{textblock}}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   408
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   409
\only<3>{
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   410
\begin{textblock}{6}(5,5.8)
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   411
\hspace{2mm}\includegraphics[scale=0.06]{../pics/assign.jpg}\\[-1mm]
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   412
\Large\alert{\hspace{5mm}\textbf{Immutability}}
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   413
\end{textblock}}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   414
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   415
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   416
\end{frame}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   417
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   418
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   419
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   420
\begin{frame}[c]
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   421
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   422
\begin{center}  
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   423
\includegraphics[scale=0.4]{../pics/pure.png}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   424
\end{center}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   425
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   426
\begin{textblock}{6}(9,14)
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   427
\tiny$^*$ from ``What pure functional programming is all about?''
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   428
\end{textblock}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   429
\end{frame}
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   430
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   431
  
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   432
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   433
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   434
\begin{frame}[c, fragile]
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   435
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   436
{\Large Why bother? or\smallskip\\\hfill What is wrong with this?}\bigskip\bigskip
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   437
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   438
  
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   439
\begin{lstlisting}[language=C,numbers=none]
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   440
for (int i = 10; i < 20; i++) {
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   441
    
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   442
  //...Do something interesting
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   443
  //   with i...
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   444
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   445
}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   446
\end{lstlisting}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   447
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   448
  
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   449
\end{frame}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   450
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   451
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   452
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   453
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   454
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   455
\begin{frame}[c]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   456
\mbox{}\\[-21mm]\mbox{}  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   457
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   458
\begin{center}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   459
  \begin{tikzpicture}[scale=1,
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   460
                      node/.style={
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   461
                      rectangle,rounded corners=3mm,
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   462
                      very thick,draw=black!50,
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   463
                      minimum height=18mm, minimum width=20mm,
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   464
                      top color=white,bottom color=black!20}]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   465
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   466
  \onslide<1-10>{                
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   467
  \node (A) at (0,0) [node]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   468
     {\mbox{\includegraphics[scale=0.15]{../pics/cplus2.jpg}}};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   469
  \node [above right] at (A.north west) {1986};}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   470
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   471
  \onslide<2->{
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   472
  \node (B) at (3.5,0) [node]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   473
     {\mbox{\includegraphics[scale=0.15]{../pics/robotron.jpg}}};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   474
  \node [above right] at (B.north west) {1988, C};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   475
  \draw [->,line width=4mm] (A) -- (B);}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   476
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   477
  \onslide<3->{
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   478
  \node (C0) at (6.3,0) {};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   479
  \node (C) at (8,0)  [node]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   480
     {\mbox{\includegraphics[scale=0.15]{../pics/sun.jpg}}};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   481
  \node [above right] at (C.north west) {1992, {\small Linux}};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   482
  \draw [->,line width=4mm] (B) -- (C0);
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   483
  \draw [->,line width=4mm] (C0) -- (C);}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   484
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   485
  \onslide<4->{
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   486
  \node (D) at (8,-3.3)  [node]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   487
     {\mbox{\includegraphics[scale=0.2]{../pics/gateway.jpg}}};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   488
  \draw [->,line width=4mm] (C) -- (D);
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   489
  \node [below right] at (D.south west) {1996};}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   490
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   491
  \onslide<5->{
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   492
  \node (E) at (4,-3.3)  [node]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   493
     {\mbox{\includegraphics[scale=0.1]{../pics/appleg4.jpg}}};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   494
  \draw [->,line width=4mm] (D) -- (E);
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   495
  \node [above right] at (E.north west) {2000};}   
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   496
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   497
  \onslide<6->{
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   498
  \node (F0) at (1.5,-3.3) {};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   499
  \node (F1) at (1,-3.3) {};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   500
  \node (F) at (-0.9,-3.3)  [node]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   501
     {\mbox{\includegraphics[scale=0.3]{../pics/appleair.png}}};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   502
  \draw [->,line width=4mm] (E) -- (F0);
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   503
  \draw [->,line width=4mm] (F1) -- (F);   
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   504
  \node [above right] at (F.north west) {2012?};}   
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   505
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   506
  \onslide<7->{
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   507
  \node (G) at (-0.9,-6.3)  [node]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   508
     {\mbox{\includegraphics[scale=0.02]{../pics/applepro.jpg}}};
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   509
  \draw [->,line width=4mm] (F) -- (G);
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   510
  \node [right] at (G.west) {\hspace{22mm}2017};}   
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   511
  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   512
  \end{tikzpicture}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   513
  \end{center}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   514
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   515
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   516
  \only<1>{%  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   517
    \begin{textblock}{10}(2.5,5)  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   518
      \includegraphics[scale=0.26]{../pics/cplus1.jpg}\\
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   519
      \footnotesize 64K RAM, no HD, no monitor, lots of cables
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   520
    \end{textblock}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   521
    \begin{textblock}{6}(10.9,4.5)  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   522
      \includegraphics[scale=0.09]{../pics/mand1.png}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   523
      \includegraphics[scale=0.09]{../pics/mand2.png}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   524
    \end{textblock}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   525
    \begin{textblock}{6}(10.8,2.2)  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   526
    \huge\bf 3 days
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   527
    \end{textblock}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   528
  }
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   529
  \only<8->{%
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   530
  \begin{textblock}{8}(5.8,11.6)  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   531
    \large\bf
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   532
    \begin{tabular}{l@{}l}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   533
      1986:\, & no Internet\\
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   534
            & no Amazon\\
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   535
            & no FB, no mobiles,\ldots\\ 
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   536
    \end{tabular}         
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   537
    \end{textblock}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   538
  }
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   539
  \only<9>{
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   540
  \begin{textblock}{1}(3,3)
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   541
    \begin{bubble}[9cm]  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   542
      \begin{tabular}{@{\hspace{8mm}}llll@{\hspace{8mm}}}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   543
        \\
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   544
      \multicolumn{4}{c}{\alert{\bf Speedup by Moore's Law}}\medskip\\
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   545
      \textbf{1986:} & 3 days    & \textbf{1996:} & 135 mins\\
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   546
      \textbf{1988:} & 1.5 days  & \textbf{1998:} & 67 mins\\
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   547
      \textbf{1990:} & 18 hs     & \textbf{2000:} & 33 mins\\
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   548
      \textbf{1992:} & 9 hs      & \textbf{2002:} & 16 mins\\
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   549
      \textbf{1994:} & 4.5 hs    & \multicolumn{2}{c}{???}\\                    
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   550
      \\
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   551
      \end{tabular}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   552
      \small Every two years, computers got twice as powerful.
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   553
  \end{bubble}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   554
  \end{textblock}}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   555
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   556
\end{frame}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   557
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   558
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   559
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   560
\begin{frame}[c]
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   561
\frametitle{Seq \;vs\; Par}
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   562
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   563
\begin{center}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   564
  \begin{tabular}[t]{@{}l@{}l@{}}
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   565
    \includegraphics[scale=0.14]{../pics/mand4.png} & \hspace{4mm}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   566
    \raisebox{0mm}{\includegraphics[scale=0.14]{../pics/mand3.png}}\\
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   567
    \hspace{6mm}\includegraphics[scale=0.5]{../pics/cpu2.png} &
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   568
    \hspace{11mm}\includegraphics[scale=0.5]{../pics/cpu1.png}
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   569
  \end{tabular}     
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   570
\end{center}  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   571
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   572
\only<2>{
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   573
  \begin{textblock}{5}(12,2)
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   574
    \begin{bubble}[2.1cm]
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   575
      \footnotesize{}in Java or C++\\
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   576
      \includegraphics[scale=0.50]{../pics/skeleton.jpg}\\
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   577
    \end{bubble}  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   578
  \end{textblock}}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   579
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   580
\only<3>{
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   581
  \begin{textblock}{14.2}(1,13.5)
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   582
    In FP: Once a variable is created, it is assigned a value and then
308
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
   583
    never changed again $\Rightarrow$ no synchronisation needed\smallskip\\
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   584
    %%\small\textcolor{gray}{(Andrew's second favourite feature of C++)}
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   585
  \end{textblock}}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   586
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   587
\end{frame}
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   588
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   589
354
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   590
%\begin{frame}
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   591
%
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   592
%\end{frame}  
137
53c769a78a1e updated
Christian Urban <urbanc@in.tum.de>
parents: 123
diff changeset
   593
354
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   594
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   595
%\begin{frame}[c, fragile]
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   596
%
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   597
%\mbox{}\bigskip\bigskip\bigskip
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   598
%  
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   599
%\begin{lstlisting}[language=Scala,numbers=none]
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   600
%for (y <- (0 until H).par) {
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   601
%  for (x <- (0 until W).par) {
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   602
%    
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   603
%    ...
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   604
%    
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   605
%  }  
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   606
%}    
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   607
%\end{lstlisting}
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   608
%
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   609
%  
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   610
%\end{frame}
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   611
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   612
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   613
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   614
\begin{frame}[c]
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   615
\frametitle{Types}
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   616
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   617
\begin{itemize}
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   618
\item Base types\smallskip
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   619
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   620
  \begin{tabular}{@{}l@{}}
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   621
    \textcolor{codegreen}{\texttt{Int}},
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   622
    \textcolor{codegreen}{\texttt{Long}},
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   623
    \textcolor{codegreen}{\texttt{BigInt}},
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   624
    \textcolor{codegreen}{\texttt{Float}},
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   625
    \textcolor{codegreen}{\texttt{Double}}\\
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   626
    \textcolor{codegreen}{\texttt{String}},
25
6253f4681451 updated
Christian Urban <urbanc@in.tum.de>
parents: 23
diff changeset
   627
    \textcolor{codegreen}{\texttt{Char}}\\
6253f4681451 updated
Christian Urban <urbanc@in.tum.de>
parents: 23
diff changeset
   628
    \textcolor{codegreen}{\texttt{Boolean}}
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   629
  \end{tabular}
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   630
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   631
\item Compound types \smallskip   
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   632
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   633
  \begin{tabular}{@{}ll@{}}
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   634
    \textcolor{codegreen}{\texttt{List[Int]}}     & lists of Int's \\
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   635
    \textcolor{codegreen}{\texttt{Set[Double]}}   & sets of Double's \\
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   636
    \textcolor{codegreen}{\texttt{(Int, String)}} & Int-String pair\\
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   637
    \textcolor{codegreen}{\texttt{List[(BigInt, String)]}} &
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   638
                                      lists of BigInt-String\\
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   639
                                      & pairs\\
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   640
    \textcolor{codegreen}{\texttt{List[List[Int]]}} & list of lists of Int's\\      \textcolor{codegreen}{\texttt{Option[Int]}}     & options of Int's \\                            
23
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   641
  \end{tabular}
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   642
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   643
\end{itemize}  
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   644
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   645
\end{frame}
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   646
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
8ac886bb0c15 updated
Christian Urban <urbanc@in.tum.de>
parents: 22
diff changeset
   647
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   648
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   649
%\begin{frame}[c]
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   650
%\frametitle{An Http Request}
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   651
  
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   652
%\begin{textblock}{1}(2,5)
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   653
%\begin{tabular}{c}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   654
%\includegraphics[scale=0.15]{../pics/servers.png}\\[-2mm]
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   655
%\small Server
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   656
%\end{tabular}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   657
%\end{textblock}
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   658
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   659
%\begin{textblock}{1}(5.6,4)
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   660
%  \begin{tikzpicture}[scale=1.1]
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   661
%  \draw[white] (0,1) node (X) {};
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   662
%  \draw[white] (2,1) node (Y) {};
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   663
%   \draw[white] (0,0) node (X1) {};
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   664
%  \draw[white] (2,0) node (Y1) {};
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   665
%   \draw[white] (0,-1) node (X2) {};
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   666
%  \draw[white] (2,-1) node (Y2) {};
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   667
%  \draw[red, <-, line width = 2mm] (X) -- (Y);
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   668
%  \node [inner sep=5pt,label=above:\textcolor{black}{GET request}] at ($ (X)!.5!(Y) $) {};
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   669
%  \draw[red, ->, line width = 2mm] (X1) -- (Y1);
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   670
%  \node [inner sep=5pt,label=above:\textcolor{black}{webpage}] at ($ (X1)!.5!(Y1) $) {};
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   671
%  \draw[red, <-, line width = 2mm] (X2) -- (Y2);
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   672
%  \node [inner sep=7pt,label=above:\textcolor{black}{POST data}] at ($ (X2)!.5!(Y2) $) {};
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   673
%  \end{tikzpicture}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   674
%\end{textblock}
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   675
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   676
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   677
%\begin{textblock}{1}(9,5.5)
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   678
%\begin{tabular}{c}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   679
%\includegraphics[scale=0.15]{../pics/laptop.png}\\[-2mm]
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   680
%\small Browser
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   681
%\end{tabular}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   682
%\end{textblock}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   683
%\end{frame}
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   684
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   685
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   686
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   687
%\begin{frame}[c]
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   688
%
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   689
%{\lstset{language=Java}\fontsize{7}{8}\selectfont
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   690
%\texttt{\lstinputlisting{URLReader.java}}}
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   691
%
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   692
%\end{frame}
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   693
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
   694
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   695
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
356
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   696
\begin{frame}[c, fragile]
359
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   697
%%\frametitle{General Scheme of}  
356
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   698
358
542d2cf143b0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 356
diff changeset
   699
 \small
542d2cf143b0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 356
diff changeset
   700
\begin{lstlisting}[language=Scala,numbers=none]
542d2cf143b0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 356
diff changeset
   701
def fname(arg1: ty1, arg2: ty2,..., argn: tyn): rty = {
356
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   702
358
542d2cf143b0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 356
diff changeset
   703
   ....
356
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   704
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   705
}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   706
\end{lstlisting}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   707
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   708
  
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   709
\end{frame}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   710
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   711
359
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   712
\begin{frame}[c, fragile]
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   713
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   714
\begin{lstlisting}[language=Scala,numbers=none]
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   715
def average(xs: List[Int]) : Int = {
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   716
  val s = xs.sum
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   717
  val n = xs.length
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   718
  s / n
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   719
}
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   720
\end{lstlisting}
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   721
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   722
  
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   723
\end{frame}
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   724
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   725
 
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   726
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   727
8aaf187d25f0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 358
diff changeset
   728
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   729
356
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   730
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   731
%\begin{frame}[c]
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   732
%  \frametitle{Coursework Dates}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   733
%  
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   734
%Similar to C++:\bigskip
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   735
%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   736
%\begin{itemize}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   737
%  \item Preliminary Parts: Wednesdays 4pm
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   738
%    \begin{itemize}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   739
%      \item Preliminary Part 6: 3\% (13 November)
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   740
%      \item Preliminary Part 7: 4\% (20 November)
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   741
%      \item Preliminary Part 8: 4\% (27 November)
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   742
%      \item Preliminary Part 9: 4\% (5 December) 
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   743
%    \end{itemize}\medskip    
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   744
%  \item Core Part: 35\% (15 January 2020)\bigskip 
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   745
%\end{itemize}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   746
%\end{frame}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   747
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   748
  
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   749
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   750
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   751
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
356
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   752
%\begin{frame}[c]
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   753
%\frametitle{Coursework}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   754
%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   755
%\begin{itemize}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   756
%\item Sorry, I might have been a bit wordy:\\
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   757
%  Part 6 of CW description is 7 pages, but
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   758
%  I only needed \mbox{< 100} loc for \emph{all} Part 6.\bigskip
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   759
%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   760
%\item there is feedback when pushing code to github\medskip
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   761
%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   762
%\item there are \texttt{jar}-files you can use to test 
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   763
%  my reference implementation\bigskip
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   764
%  
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   765
%\item we want you to learn FP!\smallskip\\ \alert{\bf no vars}, no mutable
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   766
%  data-structures\\ \quad{}e.g.~no \texttt{Arrays}, no \texttt{ListBuffer}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   767
%\end{itemize}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   768
%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   769
%\LEFTarrow{1}{11}{11.8}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   770
%\end{frame}
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   771
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   772
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   773
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   774
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   775
\begin{frame}[c, fragile]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   776
\frametitle{The Joy of Immutability}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   777
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   778
\begin{itemize}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   779
\item If you need to manipulate some data in a list say, then you make
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   780
  a new list with the updated values, rather than revise the original
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   781
  list. Easy!\medskip
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   782
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   783
  {\small
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   784
  \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   785
    val old_list = List(1, 2, 3, 5)
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   786
    val new_list = 0 :: old_list
308
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
   787
                // -> List(0, 1, 2, 3, 4, 5)
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   788
  \end{lstlisting}}  
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   789
  
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   790
\item You do not have to be defensive about who can access the data.
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   791
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   792
\item You can look at your code in isolation.  
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   793
\end{itemize}  
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   794
\end{frame}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   795
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   796
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   797
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   798
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   799
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   800
\begin{frame}[t]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   801
\frametitle{Email: Hate 'val'}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   802
308
e86add5a6961 updated
Christian Urban <urbanc@in.tum.de>
parents: 278
diff changeset
   803
\mbox{}\\[-23mm]\mbox{}
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   804
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   805
\begin{center}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   806
  \begin{bubble}[10.5cm]
354
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   807
  Subject: \textbf{Hate '\textbf{\texttt{val}}'}\hfill 01:00 AM\hspace{1cm}\medskip\\
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   808
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   809
  Hello Mr Urban,\medskip\\
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   810
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   811
  I just wanted to ask, how are we suppose to work
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   812
  with the completely useless \textbf{\texttt{val}}, that can’t be changed ever? Why is
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   813
  this rule active at all? I’ve spent 4 hours not thinking on the
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   814
  coursework, but how to bypass this annoying rule. What’s the whole
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   815
  point of all these coursework, when we can’t use everything Scala
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   816
  gives us?!?\medskip\\
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   817
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   818
  Regards.\\
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   819
  \mbox{}\hspace{5mm}\textcolor{black!50}{<<deleted>>}\\
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   820
  \end{bubble}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   821
\end{center}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   822
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   823
\end{frame}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   824
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   825
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   826
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   827
\begin{frame}[c]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   828
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   829
\mbox{}\\[-25mm]\mbox{}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   830
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   831
\begin{center}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   832
  \begin{bubble}[10.5cm]
354
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   833
  Subject: \textbf{Re: Hate '\textbf{\texttt{val}}'}\hfill 01:02 AM\hspace{1cm}\bigskip\bigskip\\
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   834
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   835
  \textcolor{black!70}{
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   836
    \textit{\large<<my usual rant about fp\ldots\\ concurrency bla bla\ldots{} better programs
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   837
    yada>>}}\bigskip\bigskip\bigskip
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   838
  
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   839
  PS: What are you trying to do where you desperately want to use \texttt{var}?
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   840
  \end{bubble}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   841
\end{center}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   842
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   843
\end{frame}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   844
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   845
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   846
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   847
\begin{frame}[c,fragile]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   848
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   849
\begin{textblock}{6}(0.5,0.5)
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   850
\begin{bubble}[11.5cm]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   851
  \small  
354
4b347b6e134f updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 353
diff changeset
   852
  Subject: \textbf{Re: Re: Hate '\textbf{\texttt{val}}'}\hfill 01:04 AM\hspace{1cm}\medskip\\
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   853
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   854
  \textbf{Right now my is\_legal function works fine:}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   855
  
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   856
\footnotesize\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   857
 def is_legal(dim: Int, path: Path)(x: Pos): Boolean = {
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   858
   var boolReturn = false
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   859
   if(x._1 > dim || x._2 > dim || x._1 < 0 || x._2 < 0) {
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   860
   else { var breakLoop = false
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   861
          if(path == Nil) { boolReturn = true }
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   862
          else { for(i <- 0 until path.length) {
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   863
                    if(breakLoop == false) {
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   864
                      if(path(i) == x) {
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   865
                        boolReturn = true
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   866
                        breakLoop = true
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   867
                      }
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   868
                      else { boolReturn = false }
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   869
                    } else breakLoop
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   870
            }
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   871
          }
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   872
          boolReturn
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   873
   }
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   874
\end{lstlisting}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   875
\end{bubble}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   876
\end{textblock}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   877
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   878
\begin{textblock}{6}(8.2,11.8)
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   879
\begin{bubble}[5.5cm]\footnotesize\bf
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   880
\ldots{}but I can’t make it work with boolReturn being val. What approach would
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   881
you recommend in this case, and is using var in this case justified?
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   882
\end{bubble}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   883
\end{textblock}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   884
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   885
\only<2>{
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   886
\begin{textblock}{6}(0.3,11.8)
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   887
  \begin{bubble}[3.1cm]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   888
    \textbf{Me:}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   889
    \raisebox{-12mm}{\includegraphics[scale=0.08]{../pics/throwup.jpg}}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   890
  \end{bubble}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   891
\end{textblock}}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   892
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   893
\end{frame}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   894
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   895
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   896
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   897
\begin{frame}[t,fragile]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   898
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   899
\mbox{}\\[-25mm]\mbox{}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   900
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   901
\begin{textblock}{6}(0.5,2)
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   902
  \begin{bubble}[11.5cm]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   903
  Subject: \textbf{Re: Re: Re: Hate '\textbf{\texttt{val}}'}\hfill 01:06 AM\bigskip\\
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   904
  \small
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   905
  
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   906
  OK. So you want to make sure that the \texttt{x}-position is not outside the
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   907
  board....and furthermore you want to make sure that the \texttt{x}-position
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   908
  is not yet in the path list. How about something like\bigskip
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   909
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   910
\footnotesize\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-1mm]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   911
 def is_legal(dim: Int, path: Path)(x: Pos): Boolean = 
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   912
   ...<<some board conditions>>... && !path.contains(x)
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   913
\end{lstlisting}\bigskip
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   914
  
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   915
  \small Does not even contain a \texttt{val}.
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   916
  \end{bubble}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   917
\end{textblock}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   918
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   919
\begin{textblock}{6}(7,12)
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   920
\footnotesize\textcolor{black!50}{(This is all on one line)}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   921
\end{textblock}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   922
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   923
\end{frame}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   924
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   925
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   926
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   927
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   928
\begin{frame}[t,fragile]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   929
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   930
\mbox{}\\[-15mm]\mbox{}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   931
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   932
\begin{textblock}{6}(1,3)
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   933
  \begin{bubble}[10.5cm]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   934
    Subject: \textbf{Re: Re: Re: Re: Hate '\textbf{\texttt{val}}'}\hfill 11:02 AM\bigskip\bigskip\\
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   935
    
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   936
    THANK YOU! You made me change my coding perspective. Because of you,
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   937
    I figured out the next one\ldots
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   938
  \end{bubble}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   939
\end{textblock}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   940
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   941
\only<2>{
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   942
\begin{textblock}{6}(0.3,11.8)
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   943
  \begin{bubble}[3.1cm]
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   944
    \textbf{Me:}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   945
    \raisebox{-12mm}{\includegraphics[scale=0.15]{../pics/happy.jpg}}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   946
  \end{bubble}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   947
\end{textblock}}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   948
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   949
\end{frame}
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   950
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   951
427
6e93040e3378 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   952
\begin{frame}[t,fragile]
6e93040e3378 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   953
6e93040e3378 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   954
\begin{bubble}[10.5cm]
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   955
\it  "PEP was my favourite module so far during these 2 years. It motivated me to apply and get a summer internship offer at S\&P Global as a Scala developer. The module content was more than enough for me to start working on the projects here at the company."\\
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   956
  \mbox{}\hfill{}--- Szabolcs Daniel Nagi (PEP 2021)
427
6e93040e3378 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   957
\end{bubble}  
6e93040e3378 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   958
\end{frame}
6e93040e3378 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   959
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
6e93040e3378 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 416
diff changeset
   960
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   961
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   962
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   963
\begin{frame}[c]
309
b192bc772613 updated
Christian Urban <urbanc@in.tum.de>
parents: 308
diff changeset
   964
\frametitle{Conclusion for Today}
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   965
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   966
\begin{itemize}
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   967
\item This year we will be using Scala 3 with the \texttt{scala-cli} REPL!\\ 
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   968
  \medskip
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   969
\item {\bf\url{https://scala-cli.virtuslab.org/}}\bigskip
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   970
  
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   971
\item Scala can be a rather \textbf{\alert{deep}} language\ldots i.e.~gives
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   972
  you a lot of rope to shoot yourself.\bigskip
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   973
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   974
\item Learning functional programming is not easy\ldots{}when you have
200
01ee4b576eb2 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
   975
  spent all of your career thinking in an imperative way, it is hard to
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   976
  change.\bigskip\medskip
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
   977
  
477
a4e1f63157d8 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 443
diff changeset
   978
\item Hope you have fun with Scala and the assignments.
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   979
\end{itemize}
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   980
\end{frame}
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   981
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   982
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   983
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
356
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   984
%\begin{frame}[c]
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   985
%\frametitle{\begin{tabular}{c}\\[0cm]\alert{Questions?}\end{tabular}}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   986
%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   987
%\begin{center}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   988
%  \begin{tabular}[t]{@{}l@{}l@{}}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   989
%    \includegraphics[scale=0.1]{../pics/mand4.png} & \hspace{4mm}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   990
%    \raisebox{0mm}{\includegraphics[scale=0.1]{../pics/mand3.png}}      
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   991
%  \end{tabular}     
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   992
%\end{center}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   993
%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   994
%\begin{center}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   995
%  My Office Hours: Thursdays 12 -- 14\\
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   996
%  And specifically for Scala: Tuesdays 10:45 -- 11:45
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   997
%\end{center}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
   998
%\end{frame}
33
b6cb302633eb updated
Christian Urban <urbanc@in.tum.de>
parents: 32
diff changeset
   999
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
314
21b52310bd8b updated
Christian Urban <urbanc@in.tum.de>
parents: 309
diff changeset
  1000
21b52310bd8b updated
Christian Urban <urbanc@in.tum.de>
parents: 309
diff changeset
  1001
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
356
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
  1002
%\begin{frame}[t]%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
  1003
%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
  1004
%\begin{center}  
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
  1005
%\includegraphics[scale=0.4]{../pics/blow.png}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
  1006
%\end{center}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
  1007
%
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
  1008
%\begin{textblock}{14}(2,12.4)
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
  1009
%\Large\bf{}Mind-Blowing\\ Programming Languages: C/C++
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
  1010
%\end{textblock}
d1046d9d3213 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 354
diff changeset
  1011
%\end{frame}
314
21b52310bd8b updated
Christian Urban <urbanc@in.tum.de>
parents: 309
diff changeset
  1012
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21b52310bd8b updated
Christian Urban <urbanc@in.tum.de>
parents: 309
diff changeset
  1013
360
e45d2890749d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 359
diff changeset
  1014
\begin{frame}[c]
e45d2890749d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 359
diff changeset
  1015
\begin{center}
e45d2890749d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 359
diff changeset
  1016
\includegraphics[scale=0.4]{../pics/fun.png}
e45d2890749d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 359
diff changeset
  1017
\end{center}
e45d2890749d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 359
diff changeset
  1018
\end{frame}
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
  1019
416
497f67fd4ae0 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 360
diff changeset
  1020
\begin{frame}<1-20>[t]
360
e45d2890749d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 359
diff changeset
  1021
  
e45d2890749d updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 359
diff changeset
  1022
\end{frame}
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents: 26
diff changeset
  1023
22
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1024
\end{document}
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1025
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1026
%%% Local Variables:  
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1027
%%% mode: latex
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1028
%%% TeX-master: t
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1029
%%% End: 
9830203b058d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
  1030
140
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
  1031
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
  1032
“Functional programming is often regarded as the best-kept secret of
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
  1033
scientific modelers, mathematicians, artificial intelligence
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
  1034
researchers, financial institutions, graphic designers, CPU designers,
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
  1035
compiler programmers, and telecommunications engineers.”
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
  1036
ecec79b9ab25 updated
Christian Urban <urbanc@in.tum.de>
parents: 137
diff changeset
  1037
The Wikipedia F# page