slides/slides01.tex
changeset 137 53c769a78a1e
parent 123 556cd74cbba9
child 140 ecec79b9ab25
equal deleted inserted replaced
136:c08ba57a7f53 137:53c769a78a1e
    32   \end{tabular}}
    32   \end{tabular}}
    33 
    33 
    34   \normalsize
    34   \normalsize
    35   \begin{center}
    35   \begin{center}
    36   \begin{tabular}{ll}
    36   \begin{tabular}{ll}
    37   Email:  & christian.urban at kcl.ac.uk\\
    37     Email:  & christian.urban at kcl.ac.uk\\
    38   Office: & N7.07 (North Wing Bush House)\\
    38     Office: & N7.07 (North Wing, Bush House)\\
    39   Slides \& Code: & KEATS
    39     Slides \& Code: & KEATS\medskip\\
       
    40     Scala Office & \\
       
    41     Hours: &  Thursdays 11 -- 13\\
    40   \end{tabular}
    42   \end{tabular}
    41   \end{center}
    43   \end{center}
    42 
    44 
    43 
    45 
    44 \end{frame}
    46 \end{frame}
    88   
    90   
    89 \item often one can write very concise and elegant code
    91 \item often one can write very concise and elegant code
    90 \end{itemize}\bigskip\medskip  
    92 \end{itemize}\bigskip\medskip  
    91 
    93 
    92 \small
    94 \small
    93 alternatives: Elm, Haskell, Ocaml, ML, Lisp (Racket), \ldots
    95 alternatives:\\
       
    96 Elm, Haskell, Ocaml, F\sharp, Erlang, ML, Lisp (Racket), \ldots
    94 
    97 
    95 \end{frame}
    98 \end{frame}
    96 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
    99 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
    97 
   100 
    98 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   101 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   120 \end{frame}
   123 \end{frame}
   121 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   124 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   122 
   125 
   123 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   126 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   124 \begin{frame}[c]
   127 \begin{frame}[c]
   125 \frametitle{Scala Tools}
   128 \frametitle{First Steps: Scala Tools}
   126 
   129 
   127 \begin{itemize}
   130 \begin{itemize}
   128 \item there is a plugin for Eclipse (called Scala IDE)\medskip
   131 \item there is a plugin for Eclipse (called Scala IDE)\medskip
   129 \item there is also a plugin for IntelliJ\bigskip
   132 \item there is also a plugin for IntelliJ\medskip
   130 \item I use the venerable Emacs ;o)
   133 \item there is a worksheet mode in Eclipse and IntelliJ\bigskip
       
   134 \item I use Sublime or venerable Emacs ;o)
   131 \end{itemize}  
   135 \end{itemize}  
   132 
   136 
   133 \end{frame}
   137 \end{frame}
   134 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   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 
   135 
   303 
   136 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   304 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   137 \begin{frame}[c]
   305 \begin{frame}[c]
   138 \frametitle{Types}
   306 \frametitle{Types}
   139 
   307