| 22 |      1 | \documentclass[dvipsnames,14pt,t,xelatex]{beamer}
 | 
|  |      2 | \usepackage{../slides}
 | 
| 32 |      3 | \usepackage{../graphics}
 | 
| 22 |      4 | \usepackage{../langs}
 | 
|  |      5 | %\usepackage{../data}
 | 
|  |      6 | 
 | 
|  |      7 | \hfuzz=220pt 
 | 
|  |      8 | 
 | 
|  |      9 | %\setmonofont[Scale=.88]{Consolas}
 | 
|  |     10 | %\newfontfamily{\consolas}{Consolas}
 | 
|  |     11 | 
 | 
|  |     12 | \lstset{language=Scala,
 | 
|  |     13 |         style=mystyle,
 | 
|  |     14 |         numbersep=0pt,
 | 
|  |     15 |         numbers=none,
 | 
|  |     16 |         xleftmargin=0mm}
 | 
|  |     17 | 
 | 
|  |     18 | \newcommand{\bl}[1]{\textcolor{blue}{#1}}     
 | 
|  |     19 | 
 | 
|  |     20 | % beamer stuff 
 | 
|  |     21 | \renewcommand{\slidecaption}{PEP (Scala) 01, King's College London}
 | 
|  |     22 | 
 | 
|  |     23 | 
 | 
|  |     24 | \begin{document}
 | 
|  |     25 | 
 | 
|  |     26 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |     27 | \begin{frame}[t]
 | 
|  |     28 | \frametitle{%
 | 
|  |     29 |   \begin{tabular}{@ {}c@ {}}
 | 
|  |     30 |   \\[5mm]
 | 
|  |     31 |   \huge PEP Scala (1) 
 | 
|  |     32 |   \end{tabular}}
 | 
|  |     33 | 
 | 
|  |     34 |   \normalsize
 | 
|  |     35 |   \begin{center}
 | 
|  |     36 |   \begin{tabular}{ll}
 | 
| 137 |     37 |     Email:  & christian.urban at kcl.ac.uk\\
 | 
|  |     38 |     Office: & N7.07 (North Wing, Bush House)\\
 | 
|  |     39 |     Slides \& Code: & KEATS\medskip\\
 | 
|  |     40 |     Scala Office & \\
 | 
|  |     41 |     Hours: &  Thursdays 11 -- 13\\
 | 
| 22 |     42 |   \end{tabular}
 | 
|  |     43 |   \end{center}
 | 
|  |     44 | 
 | 
|  |     45 | 
 | 
|  |     46 | \end{frame}
 | 
|  |     47 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |     48 | 
 | 
|  |     49 | 
 | 
|  |     50 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |     51 | \begin{frame}[c]
 | 
|  |     52 | \frametitle{Why Scala?}
 | 
|  |     53 | 
 | 
| 23 |     54 | \begin{textblock}{6}(3,4)
 | 
| 22 |     55 | \begin{tabular}{l}
 | 
|  |     56 | \mbox{}\hspace{-1mm}\includegraphics[scale=0.36]{../pics/twitter.png}\\[-1mm]
 | 
|  |     57 | \includegraphics[scale=0.30]{../pics/linked.png}\\
 | 
|  |     58 | \includegraphics[scale=0.30]{../pics/guardian.jpg}\\[-3mm]
 | 
|  |     59 | \mbox{}\hspace{-2mm}\includegraphics[scale=0.38]{../pics/morgan.png}\\[-3mm]
 | 
|  |     60 | \includegraphics[scale=0.30]{../pics/suisse.png}\\
 | 
| 23 |     61 | {\large\bf ...}
 | 
|  |     62 | \end{tabular}
 | 
|  |     63 | \end{textblock}
 | 
|  |     64 | 
 | 
|  |     65 | \begin{textblock}{6}(9,4)
 | 
|  |     66 | \begin{tabular}{l}
 | 
| 22 |     67 | \includegraphics[scale=0.20]{../pics/edf.png}\\[-1mm]
 | 
|  |     68 | \includegraphics[scale=0.08]{../pics/novell.png}\\[-1mm]
 | 
|  |     69 | \includegraphics[scale=0.30]{../pics/foursquare.png}\\
 | 
|  |     70 | \includegraphics[scale=0.30]{../pics/hsbc.png}\\
 | 
|  |     71 | {\large\bf ...}
 | 
|  |     72 | \end{tabular}
 | 
|  |     73 | \end{textblock}
 | 
|  |     74 | 
 | 
|  |     75 | \end{frame}
 | 
|  |     76 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
 | 
|  |     77 | 
 | 
| 23 |     78 | 
 | 
|  |     79 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |     80 | \begin{frame}[c]
 | 
|  |     81 | \frametitle{Why Scala?}
 | 
|  |     82 | 
 | 
|  |     83 | \begin{itemize}
 | 
| 34 |     84 | \item compiles to the JVM\\
 | 
|  |     85 |   \textcolor{gray}{(also JavaScript, native X86 in the works)}\medskip
 | 
| 32 |     86 | \item integrates seamlessly with Java\medskip
 | 
| 33 |     87 | \item combines \underline{\bf functional} and {\bf object-oriented} programming\bigskip
 | 
| 34 |     88 | \item it is a bit on the ``mathematical'' side\\
 | 
|  |     89 |   \textcolor{gray}{(no pointers, no \texttt{null})}
 | 
|  |     90 |   
 | 
| 33 |     91 | \item often one can write very concise and elegant code
 | 
|  |     92 | \end{itemize}\bigskip\medskip  
 | 
|  |     93 | 
 | 
|  |     94 | \small
 | 
| 137 |     95 | alternatives:\\
 | 
|  |     96 | Elm, Haskell, Ocaml, F\sharp, Erlang, ML, Lisp (Racket), \ldots
 | 
| 23 |     97 | 
 | 
|  |     98 | \end{frame}
 | 
| 22 |     99 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
| 23 |    100 | 
 | 
|  |    101 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    102 | \begin{frame}[c]
 | 
| 32 |    103 | \frametitle{Java vs Scala}
 | 
|  |    104 | 
 | 
|  |    105 | {\lstset{language=java}\fontsize{12}{12}\selectfont
 | 
|  |    106 | \texttt{\lstinputlisting{Point.java}}}
 | 
|  |    107 | 
 | 
| 33 |    108 | \rule{11cm}{0.3mm}\\[-2mm]
 | 
|  |    109 | 
 | 
| 32 |    110 | {\lstset{language=scala}\fontsize{12}{12}\selectfont
 | 
|  |    111 | \texttt{\lstinputlisting{Point.scala}}}
 | 
|  |    112 | 
 | 
|  |    113 | \begin{textblock}{6}(13,3)
 | 
|  |    114 | \textbf{\large Java}
 | 
| 33 |    115 | \end{textblock}
 | 
|  |    116 | 
 | 
| 32 |    117 | 
 | 
| 33 |    118 | 
 | 
|  |    119 | \begin{textblock}{6}(13,13.4)
 | 
| 32 |    120 | \textbf{\large Scala}
 | 
|  |    121 | \end{textblock}  
 | 
|  |    122 | 
 | 
|  |    123 | \end{frame}
 | 
|  |    124 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    125 | 
 | 
| 33 |    126 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    127 | \begin{frame}[c]
 | 
| 137 |    128 | \frametitle{First Steps: Scala Tools}
 | 
| 32 |    129 | 
 | 
| 33 |    130 | \begin{itemize}
 | 
|  |    131 | \item there is a plugin for Eclipse (called Scala IDE)\medskip
 | 
| 137 |    132 | \item there is also a plugin for IntelliJ\medskip
 | 
|  |    133 | \item there is a worksheet mode in Eclipse and IntelliJ\bigskip
 | 
|  |    134 | \item I use Sublime or venerable Emacs ;o)
 | 
| 33 |    135 | \end{itemize}  
 | 
|  |    136 | 
 | 
|  |    137 | \end{frame}
 | 
| 137 |    138 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    139 | 
 | 
|  |    140 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    141 | \begin{frame}[c]
 | 
|  |    142 |   \frametitle{\bf
 | 
|  |    143 |   \only<1>{\begin{tabular}{l}\\[2mm]Why Scala?\\ \mbox{}\end{tabular}}
 | 
|  |    144 |   \only<2->{\begin{tabular}{l}\\[2mm]Why Functional\\ Programming?\end{tabular}}
 | 
|  |    145 | }
 | 
|  |    146 | 
 | 
|  |    147 | 
 | 
|  |    148 |   %
 | 
|  |    149 |   \mbox{}\\[3.5cm]
 | 
|  |    150 |   \small
 | 
|  |    151 | Scala, Elm, Haskell, Ocaml, F\sharp, Erlang, ML, Lisp (Racket), \ldots 
 | 
|  |    152 | 
 | 
|  |    153 | \only<3>{
 | 
|  |    154 | \begin{textblock}{6}(2,6.2)
 | 
|  |    155 | \begin{bubble}[10cm]
 | 
|  |    156 | \normalsize``If you want to see which features will be in mainstream programming
 | 
|  |    157 |   languages tomorrow, then take a look at functional programming
 | 
|  |    158 |   languages today.''\medskip\small\\
 | 
|  |    159 |   \hfill{}---Simon Peyton Jones (works at Microsoft)\\
 | 
|  |    160 |   \hfill{}main developer of the Glasgow Haskell Compiler
 | 
|  |    161 | \end{bubble}
 | 
|  |    162 | \end{textblock}}
 | 
|  |    163 | 
 | 
|  |    164 | \end{frame}
 | 
|  |    165 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    166 | 
 | 
|  |    167 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
 | 
|  |    168 | \begin{frame}[c]
 | 
|  |    169 | \mbox{}\\[-21mm]\mbox{}  
 | 
|  |    170 | 
 | 
|  |    171 | \begin{center}
 | 
|  |    172 |   \begin{tikzpicture}[scale=1,
 | 
|  |    173 |                       node/.style={
 | 
|  |    174 |                       rectangle,rounded corners=3mm,
 | 
|  |    175 |                       very thick,draw=black!50,
 | 
|  |    176 |                       minimum height=18mm, minimum width=20mm,
 | 
|  |    177 |                       top color=white,bottom color=black!20}]
 | 
|  |    178 | 
 | 
|  |    179 |   \onslide<1-10>{                
 | 
|  |    180 |   \node (A) at (0,0) [node]
 | 
|  |    181 |      {\mbox{\includegraphics[scale=0.15]{../pics/cplus2.jpg}}};
 | 
|  |    182 |   \node [above right] at (A.north west) {1986};}
 | 
|  |    183 | 
 | 
|  |    184 |   \onslide<2->{
 | 
|  |    185 |   \node (B) at (3.5,0) [node]
 | 
|  |    186 |      {\mbox{\includegraphics[scale=0.15]{../pics/robotron.jpg}}};
 | 
|  |    187 |   \node [above right] at (B.north west) {1988, C};
 | 
|  |    188 |   \draw [->,line width=4mm] (A) -- (B);}
 | 
|  |    189 | 
 | 
|  |    190 |   \onslide<3->{
 | 
|  |    191 |   \node (C0) at (6.3,0) {};
 | 
|  |    192 |   \node (C) at (8,0)  [node]
 | 
|  |    193 |      {\mbox{\includegraphics[scale=0.15]{../pics/sun.jpg}}};
 | 
|  |    194 |   \node [above right] at (C.north west) {1992, {\small Linux}};
 | 
|  |    195 |   \draw [->,line width=4mm] (B) -- (C0);
 | 
|  |    196 |   \draw [->,line width=4mm] (C0) -- (C);}
 | 
|  |    197 | 
 | 
|  |    198 |   \onslide<4->{
 | 
|  |    199 |   \node (D) at (8,-3.3)  [node]
 | 
|  |    200 |      {\mbox{\includegraphics[scale=0.2]{../pics/gateway.jpg}}};
 | 
|  |    201 |   \draw [->,line width=4mm] (C) -- (D);
 | 
|  |    202 |   \node [below right] at (D.south west) {1996};}
 | 
|  |    203 | 
 | 
|  |    204 |   \onslide<5->{
 | 
|  |    205 |   \node (E) at (4,-3.3)  [node]
 | 
|  |    206 |      {\mbox{\includegraphics[scale=0.1]{../pics/appleg4.jpg}}};
 | 
|  |    207 |   \draw [->,line width=4mm] (D) -- (E);
 | 
|  |    208 |   \node [above right] at (E.north west) {2000};}   
 | 
|  |    209 | 
 | 
|  |    210 |   \onslide<6->{
 | 
|  |    211 |   \node (F0) at (1.5,-3.3) {};
 | 
|  |    212 |   \node (F1) at (1,-3.3) {};
 | 
|  |    213 |   \node (F) at (-0.9,-3.3)  [node]
 | 
|  |    214 |      {\mbox{\includegraphics[scale=0.3]{../pics/appleair.png}}};
 | 
|  |    215 |   \draw [->,line width=4mm] (E) -- (F0);
 | 
|  |    216 |   \draw [->,line width=4mm] (F1) -- (F);   
 | 
|  |    217 |   \node [above right] at (F.north west) {2012?};}   
 | 
|  |    218 | 
 | 
|  |    219 |   \onslide<7->{
 | 
|  |    220 |   \node (G) at (-0.9,-6.3)  [node]
 | 
|  |    221 |      {\mbox{\includegraphics[scale=0.02]{../pics/applepro.jpg}}};
 | 
|  |    222 |   \draw [->,line width=4mm] (F) -- (G);
 | 
|  |    223 |   \node [right] at (G.west) {\hspace{22mm}2017};}   
 | 
|  |    224 |   
 | 
|  |    225 |   \end{tikzpicture}
 | 
|  |    226 |   \end{center}
 | 
|  |    227 | 
 | 
|  |    228 | 
 | 
|  |    229 |   \only<1>{%  
 | 
|  |    230 |     \begin{textblock}{10}(2.5,5)  
 | 
|  |    231 |       \includegraphics[scale=0.26]{../pics/cplus1.jpg}\\
 | 
|  |    232 |       \footnotesize 64K RAM, no HD, no monitor, lots of cables
 | 
|  |    233 |     \end{textblock}
 | 
|  |    234 |     \begin{textblock}{6}(10.9,4.5)  
 | 
|  |    235 |       \includegraphics[scale=0.09]{../pics/mand1.png}
 | 
|  |    236 |       \includegraphics[scale=0.09]{../pics/mand2.png}
 | 
|  |    237 |     \end{textblock}
 | 
|  |    238 |     \begin{textblock}{6}(10.8,2.2)  
 | 
|  |    239 |     \huge\bf 3 days
 | 
|  |    240 |     \end{textblock}
 | 
|  |    241 |   }
 | 
|  |    242 |   \only<8->{%
 | 
|  |    243 |   \begin{textblock}{8}(5.8,11.6)  
 | 
|  |    244 |     \large\bf
 | 
|  |    245 |     \begin{tabular}{l@{}l}
 | 
|  |    246 |       1986:\, & no Internet\\
 | 
|  |    247 |             & no Amazon\\
 | 
|  |    248 |             & no FB, no mobiles,\ldots\\ 
 | 
|  |    249 |     \end{tabular}         
 | 
|  |    250 |     \end{textblock}
 | 
|  |    251 |   }
 | 
|  |    252 |   \only<9>{
 | 
|  |    253 |   \begin{textblock}{1}(3,3)
 | 
|  |    254 |     \begin{bubble}[9cm]  
 | 
|  |    255 |       \begin{tabular}{@{\hspace{8mm}}llll@{\hspace{8mm}}}
 | 
|  |    256 |         \\
 | 
|  |    257 |       \multicolumn{4}{c}{\bf Speedup by Moore's Law}\medskip\\
 | 
|  |    258 |       \textbf{1986:} & 3 days    & \textbf{1996:} & 135 mins\\
 | 
|  |    259 |       \textbf{1988:} & 1.5 days  & \textbf{1998:} & 67 mins\\
 | 
|  |    260 |       \textbf{1990:} & 18 hs     & \textbf{2000:} & 33 mins\\
 | 
|  |    261 |       \textbf{1992:} & 9 hs      & \textbf{2002:} & 16 mins\\
 | 
|  |    262 |       \textbf{1994:} & 4.5 hs    & \multicolumn{2}{c}{???}\\                    
 | 
|  |    263 |       \\
 | 
|  |    264 |       \end{tabular}
 | 
|  |    265 |       \small Every two years, computers got twice as powerful.
 | 
|  |    266 |   \end{bubble}
 | 
|  |    267 |   \end{textblock}}
 | 
|  |    268 | 
 | 
|  |    269 | \end{frame}
 | 
|  |    270 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    271 | 
 | 
|  |    272 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    273 | \begin{frame}[c]
 | 
|  |    274 | \frametitle{Seq vs Par}
 | 
|  |    275 | 
 | 
|  |    276 | \begin{center}
 | 
|  |    277 |   \begin{tabular}[t]{@{}l@{}l@{}}
 | 
|  |    278 |     \includegraphics[scale=0.14]{../pics/mand4.png} &
 | 
|  |    279 |     \raisebox{1.2mm}{\includegraphics[scale=0.14]{../pics/mand3.png}}      
 | 
|  |    280 |   \end{tabular}     
 | 
|  |    281 | \end{center}  
 | 
|  |    282 | 
 | 
|  |    283 | \only<2>{
 | 
|  |    284 |   \begin{textblock}{5}(12,2)
 | 
|  |    285 |     \begin{bubble}[2.1cm]
 | 
|  |    286 |       \footnotesize{}in Java or C++\\
 | 
|  |    287 |       \includegraphics[scale=0.50]{../pics/skeleton.jpg}\\
 | 
|  |    288 |     \end{bubble}  
 | 
|  |    289 |   \end{textblock}}
 | 
|  |    290 | 
 | 
|  |    291 | \only<3>{
 | 
|  |    292 |   \begin{textblock}{5}(1,8)
 | 
|  |    293 |     \begin{bubble}[2.1cm]
 | 
|  |    294 |       \footnotesize{}in Java or C++\\
 | 
|  |    295 |     \end{bubble}  
 | 
|  |    296 |   \end{textblock}}
 | 
|  |    297 | 
 | 
|  |    298 | \end{frame}
 | 
|  |    299 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
 | 
|  |    300 | 
 | 
|  |    301 | 
 | 
|  |    302 | 
 | 
| 32 |    303 | 
 | 
|  |    304 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    305 | \begin{frame}[c]
 | 
| 23 |    306 | \frametitle{Types}
 | 
|  |    307 | 
 | 
|  |    308 | \begin{itemize}
 | 
| 33 |    309 | \item Base types\smallskip
 | 
| 23 |    310 | 
 | 
| 33 |    311 |   \begin{tabular}{@{}l@{}}
 | 
| 23 |    312 |     \textcolor{codegreen}{\texttt{Int}},
 | 
|  |    313 |     \textcolor{codegreen}{\texttt{Long}},
 | 
|  |    314 |     \textcolor{codegreen}{\texttt{BigInt}},
 | 
|  |    315 |     \textcolor{codegreen}{\texttt{Float}},
 | 
|  |    316 |     \textcolor{codegreen}{\texttt{Double}}\\
 | 
|  |    317 |     \textcolor{codegreen}{\texttt{String}},
 | 
| 25 |    318 |     \textcolor{codegreen}{\texttt{Char}}\\
 | 
|  |    319 |     \textcolor{codegreen}{\texttt{Boolean}}
 | 
| 23 |    320 |   \end{tabular}
 | 
|  |    321 | 
 | 
| 33 |    322 | \item Compound types \smallskip   
 | 
| 23 |    323 | 
 | 
| 33 |    324 |   \begin{tabular}{@{}ll@{}}
 | 
| 23 |    325 |     \textcolor{codegreen}{\texttt{List[Int]}}     & lists of Int's \\
 | 
|  |    326 |     \textcolor{codegreen}{\texttt{Set[Double]}}   & sets of Double's \\
 | 
|  |    327 |     \textcolor{codegreen}{\texttt{(Int, String)}} & Int-String pair\\
 | 
|  |    328 |     \textcolor{codegreen}{\texttt{List[(BigInt, String)]}} &
 | 
|  |    329 |                                       lists of BigInt-String\\
 | 
|  |    330 |                                       & pairs\\
 | 
| 26 |    331 |     \textcolor{codegreen}{\texttt{List[List[Int]]}} & list of lists of Int's\\                                  
 | 
| 23 |    332 |   \end{tabular}
 | 
|  |    333 | 
 | 
|  |    334 | \end{itemize}  
 | 
|  |    335 | 
 | 
|  |    336 | \end{frame}
 | 
|  |    337 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    338 | 
 | 
| 32 |    339 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    340 | \begin{frame}[c]
 | 
|  |    341 | \frametitle{An Http Request}
 | 
|  |    342 |   
 | 
|  |    343 | \begin{textblock}{1}(2,5)
 | 
|  |    344 | \begin{tabular}{c}
 | 
|  |    345 | \includegraphics[scale=0.15]{../pics/servers.png}\\[-2mm]
 | 
|  |    346 | \small Server
 | 
|  |    347 | \end{tabular}
 | 
|  |    348 | \end{textblock}
 | 
|  |    349 | 
 | 
|  |    350 | \begin{textblock}{1}(5.6,4)
 | 
|  |    351 |   \begin{tikzpicture}[scale=1.1]
 | 
|  |    352 |   \draw[white] (0,1) node (X) {};
 | 
|  |    353 |   \draw[white] (2,1) node (Y) {};
 | 
|  |    354 |    \draw[white] (0,0) node (X1) {};
 | 
|  |    355 |   \draw[white] (2,0) node (Y1) {};
 | 
|  |    356 |    \draw[white] (0,-1) node (X2) {};
 | 
|  |    357 |   \draw[white] (2,-1) node (Y2) {};
 | 
|  |    358 |   \draw[red, <-, line width = 2mm] (X) -- (Y);
 | 
|  |    359 |   \node [inner sep=5pt,label=above:\textcolor{black}{GET request}] at ($ (X)!.5!(Y) $) {};
 | 
|  |    360 |   \draw[red, ->, line width = 2mm] (X1) -- (Y1);
 | 
|  |    361 |   \node [inner sep=5pt,label=above:\textcolor{black}{webpage}] at ($ (X1)!.5!(Y1) $) {};
 | 
|  |    362 |   \draw[red, <-, line width = 2mm] (X2) -- (Y2);
 | 
|  |    363 |   \node [inner sep=7pt,label=above:\textcolor{black}{POST data}] at ($ (X2)!.5!(Y2) $) {};
 | 
|  |    364 |   \end{tikzpicture}
 | 
|  |    365 | \end{textblock}
 | 
|  |    366 | 
 | 
|  |    367 | 
 | 
|  |    368 | \begin{textblock}{1}(9,5.5)
 | 
|  |    369 | \begin{tabular}{c}
 | 
|  |    370 | \includegraphics[scale=0.15]{../pics/laptop.png}\\[-2mm]
 | 
|  |    371 | \small Browser
 | 
|  |    372 | \end{tabular}
 | 
|  |    373 | \end{textblock}
 | 
|  |    374 | \end{frame}
 | 
|  |    375 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    376 | 
 | 
|  |    377 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    378 | \begin{frame}[c]
 | 
|  |    379 | 
 | 
|  |    380 | {\lstset{language=Java}\fontsize{7}{8}\selectfont
 | 
|  |    381 | \texttt{\lstinputlisting{URLReader.java}}}
 | 
|  |    382 | 
 | 
|  |    383 | \only<2>{
 | 
|  |    384 | \begin{textblock}{5}(12,2)
 | 
|  |    385 | \includegraphics[scale=0.50]{../pics/skeleton.jpg}\\
 | 
|  |    386 | \end{textblock}}
 | 
|  |    387 | \end{frame}
 | 
|  |    388 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    389 | 
 | 
| 33 |    390 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    391 | \begin{frame}[c]
 | 
|  |    392 | \frametitle{Conclusion}
 | 
|  |    393 | 
 | 
|  |    394 | \begin{itemize}
 | 
|  |    395 | \item Scala is still under heavy development\\ (the compiler is terribly slow)\medskip
 | 
|  |    396 | \item {\bf\url{http://www.scala-lang.org/}}\bigskip
 | 
|  |    397 | \item it is a rather \textbf{\alert{deep}} language\ldots i.e.~gives you a lot of
 | 
|  |    398 |   rope to shoot yourself\bigskip\bigskip 
 | 
|  |    399 | 
 | 
|  |    400 | \item hope you have fun with the coursework  
 | 
|  |    401 | \end{itemize}
 | 
|  |    402 | \end{frame}
 | 
|  |    403 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    404 | 
 | 
|  |    405 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 | 
|  |    406 | \begin{frame}[c]
 | 
|  |    407 | \frametitle{\begin{tabular}{c}\\[3cm]\alert{Questions?}\end{tabular}}
 | 
|  |    408 | 
 | 
|  |    409 | \mbox{}
 | 
|  |    410 | \end{frame}
 | 
|  |    411 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 | 
|  |    412 | \end{document}
 | 
| 32 |    413 | 
 | 
|  |    414 | 
 | 
| 22 |    415 | \end{document}
 | 
|  |    416 | 
 | 
|  |    417 | %%% Local Variables:  
 | 
|  |    418 | %%% mode: latex
 | 
|  |    419 | %%% TeX-master: t
 | 
|  |    420 | %%% End: 
 | 
|  |    421 | 
 |