slides/slides05.tex
changeset 454 289b85843ffd
parent 418 fa7f7144f2bb
child 455 557d18cce0f0
equal deleted inserted replaced
453:08cd972b219f 454:289b85843ffd
     1 % !TEX program = xelatex
     1 % !TEX program = xelatex
     2 \documentclass[dvipsnames,14pt,t,xelatex,aspectratio=169,xcolor={table}]{beamer}
     2 \documentclass[dvipsnames,14pt,t,xelatex,aspectratio=169,xcolor={table}]{beamer}
     3 \usepackage{../slides}
     3 \usepackage{../styles/slides}
     4 \usepackage{../graphics}
     4 \usepackage{../styles/mygraphs}
     5 \usepackage{../langs}
     5 \usepackage{../styles/langs}
     6 %%\usepackage{../data}
     6 %%\usepackage{../data}
     7 %%\usepackage[export]{adjustbox}
     7 %%\usepackage[export]{adjustbox}
     8 \usetikzlibrary{shapes,arrows,shadows}
     8 \usetikzlibrary{shapes,arrows,shadows}
     9 
     9 
    10 
    10 
   160   \begin{center}
   160   \begin{center}
   161   \begin{tabular}{ll}
   161   \begin{tabular}{ll}
   162     Email:  & christian.urban at kcl.ac.uk\\
   162     Email:  & christian.urban at kcl.ac.uk\\
   163     %Office: & N\liningnums{7.07} (North Wing, Bush House)\bigskip\\
   163     %Office: & N\liningnums{7.07} (North Wing, Bush House)\bigskip\\
   164     Slides \& Code: & KEATS\bigskip\\
   164     Slides \& Code: & KEATS\bigskip\\
   165     %                & \onslide<2>{\alert{PDF: A Crash-Course in Scala}}\bigskip\\
   165 
   166     %Office Hours: &  Thursdays 12:00 -- 14:00\\
   166     Office Hour: &  Fridays 11:00 -- 12:00\\
   167     %Additionally: & (for Scala) Tuesdays 10:45 -- 11:45\\
   167     Location: & N7.07 (North Wing, Bush House)\bigskip\\
   168     \multicolumn{2}{c}{\Large\textbf{https://pollev.com/cfltutoratki576}}\\[2cm]
   168 
       
   169     Pollev: & \texttt{\alert{https://pollev.com/cfltutoratki576}}\\  \\
   169   \end{tabular}
   170   \end{tabular}
   170   \end{center}
   171   \end{center}
   171 
   172 
   172 \end{frame}
   173 \end{frame}
   173 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   174 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   174 
   175 
   175 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   176 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   176 \begin{frame}<1>[c]
   177 \begin{frame}[t]
       
   178 \frametitle{Housekeeping}
       
   179 
       
   180 \mbox{}\medskip  
       
   181 
       
   182 \begin{minipage}{1.2\textwidth}
       
   183 \begin{itemize}
       
   184 \item SGTs still ongoing next week
       
   185 \item LGT next week online Ask-Me-Anything (will be recorded, TEAMS link will be emailed and published on KEATS)
       
   186 \item tests might break over Christmas  
       
   187 \end{itemize}\bigskip
       
   188 
       
   189 \begin{center}
       
   190 \raisebox{-9mm}{\includegraphics[scale=0.15]{../pics/thanks.jpeg}} Junhuai Hou \quad Chin Wan
       
   191 \end{center}  
       
   192 \end{minipage}
       
   193 
       
   194 
       
   195 \end{frame}
       
   196 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   197 
       
   198 
       
   199 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   200 \begin{frame}[c]
   177   \frametitle{Main 3: Regexes}
   201   \frametitle{Main 3: Regexes}
   178   
   202   
   179 \begin{center}
   203 \begin{center}
   180   \mbox{Graphs: regex \alert{\texttt{(a*)*b}} and strings $\underbrace{\;\texttt{a}\ldots \texttt{a}\;}_{n}$}\bigskip
   204   \mbox{Graphs: regex \alert{\texttt{(a*)*b}} and strings $\underbrace{\;\texttt{a}\ldots \texttt{a}\;}_{n}$}\bigskip
   181 
       
   182 
   205 
   183   \small  
   206   \small  
   184 \begin{tabular}[t]{@{\hspace{-8mm}}c@{\hspace{-0mm}}c@{}}
   207 \begin{tabular}[t]{@{\hspace{-8mm}}c@{\hspace{-0mm}}c@{}}
   185 \only<1>{\raisebox{6mm}{\begin{tikzpicture}
   208 \only<1>{\raisebox{6mm}{\begin{tikzpicture}
   186 \begin{axis}[
   209 \begin{axis}[
   280 
   303 
   281 \begin{frame}[c]
   304 \begin{frame}[c]
   282 \frametitle{Plan for Today}
   305 \frametitle{Plan for Today}
   283 
   306 
   284 \begin{itemize}
   307 \begin{itemize}
   285 \item Being Lazy
   308 \item Implicits
   286 \item Polymorphic Types
   309 \item Polymorphic Types
   287 \item Immutable OOP
   310 \item Immutable OOP
   288 \item Making Fun about Scala
   311 \item Making Fun about Scala
   289 \end{itemize}
   312 \end{itemize}
   290 
   313 
   291 \end{frame}
   314 \end{frame}
   292 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   315 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   293 
   316 
   294 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   317 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   295 \begin{frame}[c,fragile]
   318 %\begin{frame}[c,fragile]
   296 \frametitle{How To calcululate 100 Mio Collatz Series?} 
   319 %\frametitle{How To calcululate 100 Mio Collatz Series?} 
   297 
   320 %
   298 \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=1mm]
   321 %\begin{lstlisting}[language=Scala, numbers=none, xleftmargin=1mm]
   299 (1L to 100_000_000).map(collatz).max
   322 %(1L to 100_000_000).map(collatz).max
   300 \end{lstlisting}
   323 %\end{lstlisting}
   301 
   324 %
   302 \end{frame}
   325 %\end{frame}
   303 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   326 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   304 
   327 
   305 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   328 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   306 \begin{frame}[c,fragile]
   329 \begin{frame}[c,fragile]
   307 \frametitle{Polyorphic Types} 
   330 \frametitle{Polyorphic Types} 
   308 
   331 
   309 To be avoided:\bigskip\bigskip
   332 %To be avoided:\bigskip\bigskip
   310 \small
   333 \small
   311 
   334 
   312 \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-6mm]
   335 \begin{lstlisting}[language=Scala, numbers=none, xleftmargin=-6mm]
   313 def length_string_list(lst: List[String]): Int = 
   336 def length_string_list(lst: List[String]): Int = 
   314  lst match {
   337  lst match {
   315    case Nil => 0
   338    case Nil => 0
   316    case x::xs => 1 + length_string_list(xs)
   339    case x::xs => 1 + length_string_list(xs)
   317  }
   340  }
   318 
   341 
   319 
   342  
   320 def length_int_list(lst: List[Int]): Int = 
   343 def length_int_list(lst: List[Int]): Int = 
   321  lst match {
   344  lst match {
   322    case Nil => 0
   345    case Nil => 0
   323    case x::xs => 1 + length_int_list(xs)
   346    case x::xs => 1 + length_int_list(xs)
   324  }
   347  }
   453 
   476 
   454 \begin{frame}[c]
   477 \begin{frame}[c]
   455 \frametitle{Where to go on from here?}
   478 \frametitle{Where to go on from here?}
   456 
   479 
   457 \begin{itemize}
   480 \begin{itemize}
   458 \item Martin Odersky (EPFL) developed Scala 3.0\medskip
   481 \item Martin Odersky (EPFL) developed now Scala 3\medskip
   459 
   482 
       
   483 \item I use Ammonite by Haoji Li\medskip
       
   484   
   460 \item Elm (\url{http://elm-lang.org})\ldots web applications with style\medskip   
   485 \item Elm (\url{http://elm-lang.org})\ldots web applications with style\medskip   
   461 
   486 
   462 \item Haskell, Ocaml, Standard ML, Scheme, \ldots 
   487 \item Haskell, Ocaml, Standard ML, Scheme, \ldots 
   463 \end{itemize}  
   488 \end{itemize}  
   464 \end{frame}
   489 \end{frame}