slides/slides09.tex
changeset 215 828303e8e4af
parent 207 f824e1331fc6
child 309 640e4a05cd9b
equal deleted inserted replaced
214:5be68de225e9 215:828303e8e4af
     1 \documentclass[dvipsnames,14pt,t]{beamer}
     1 \documentclass[dvipsnames,14pt,t]{beamer}
     2 \usepackage{beamerthemeplaincu}
     2 \usepackage{beamerthemeplaincu}
     3 %\usepackage[T1]{fontenc}
       
     4 %\usepackage[latin1]{inputenc}
       
     5 \usepackage{mathpartir}
       
     6 \usepackage[absolute,overlay]{textpos}
     3 \usepackage[absolute,overlay]{textpos}
     7 \usepackage{ifthen}
     4 \usepackage{ifthen}
     8 \usepackage{tikz}
     5 \usepackage{tikz}
     9 \usepackage{pgf}
     6 \usepackage{pgf}
    10 \usepackage{calc} 
     7 \usepackage{calc} 
    19 \usetikzlibrary{positioning}
    16 \usetikzlibrary{positioning}
    20 \usetikzlibrary{calc}
    17 \usetikzlibrary{calc}
    21 \usetikzlibrary{plotmarks}
    18 \usetikzlibrary{plotmarks}
    22 \usepackage{graphicx} 
    19 \usepackage{graphicx} 
    23 \usepackage{pgfplots}
    20 \usepackage{pgfplots}
    24 \setmonofont{Consolas}
    21 \usepackage{../langs}
    25 
    22 \usepackage{../data}
    26 \definecolor{javared}{rgb}{0.6,0,0} % for strings
    23 
    27 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
       
    28 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
       
    29 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
       
    30 
       
    31 \lstset{language=Java,
       
    32 	basicstyle=\ttfamily,
       
    33 	keywordstyle=\color{javapurple}\bfseries,
       
    34 	stringstyle=\color{javagreen},
       
    35 	commentstyle=\color{javagreen},
       
    36 	morecomment=[s][\color{javadocblue}]{/**}{*/},
       
    37 	numbers=left,
       
    38 	numberstyle=\tiny\color{black},
       
    39 	stepnumber=1,
       
    40 	numbersep=10pt,
       
    41 	tabsize=2,
       
    42 	showspaces=false,
       
    43 	showstringspaces=false}
       
    44 
       
    45 \lstdefinelanguage{scala}{
       
    46   morekeywords={abstract,case,catch,class,def,%
       
    47     do,else,extends,false,final,finally,%
       
    48     for,if,implicit,import,match,mixin,%
       
    49     new,null,object,override,package,%
       
    50     private,protected,requires,return,sealed,%
       
    51     super,this,throw,trait,true,try,%
       
    52     type,val,var,while,with,yield},
       
    53   otherkeywords={=>,<-,<\%,<:,>:,\#,@},
       
    54   sensitive=true,
       
    55   morecomment=[l]{//},
       
    56   morecomment=[n]{/*}{*/},
       
    57   morestring=[b]",
       
    58   morestring=[b]',
       
    59   morestring=[b]"""
       
    60 }
       
    61 
       
    62 
       
    63 \lstset{language=Scala,
       
    64 	basicstyle=\ttfamily,
       
    65 	keywordstyle=\color{javapurple}\bfseries,
       
    66 	stringstyle=\color{javagreen},
       
    67 	commentstyle=\color{javagreen},
       
    68 	morecomment=[s][\color{javadocblue}]{/**}{*/},
       
    69 	numbers=left,
       
    70 	numberstyle=\tiny\color{black},
       
    71 	stepnumber=1,
       
    72 	numbersep=10pt,
       
    73 	tabsize=2,
       
    74 	showspaces=false,
       
    75 	showstringspaces=false}
       
    76 
       
    77 \lstdefinelanguage{while}{
       
    78   morekeywords={if,then,else,while,do,true,false,write},
       
    79   otherkeywords={=,!=,:=,<,>,;},
       
    80   sensitive=true,
       
    81   morecomment=[n]{/*}{*/},
       
    82 }
       
    83 
       
    84 
       
    85 \lstset{language=While,
       
    86 	basicstyle=\ttfamily,
       
    87 	keywordstyle=\color{javapurple}\bfseries,
       
    88 	stringstyle=\color{javagreen},
       
    89 	commentstyle=\color{javagreen},
       
    90 	morecomment=[s][\color{javadocblue}]{/**}{*/},
       
    91 	numbers=left,
       
    92 	numberstyle=\tiny\color{black},
       
    93 	stepnumber=1,
       
    94 	numbersep=10pt,
       
    95 	tabsize=2,
       
    96 	showspaces=false,
       
    97 	showstringspaces=false}
       
    98 	
       
    99 
    24 
   100 % beamer stuff 
    25 % beamer stuff 
   101 \renewcommand{\slidecaption}{AFL 09, King's College London, 27.~November 2013}
    26 \renewcommand{\slidecaption}{AFL 09, King's College London, 27.~November 2013}
   102 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
    27 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
   103 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
    28 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
   113     {\pgftransformscale{0.8}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
    38     {\pgftransformscale{0.8}\pgftext{\normalsize\pgfuseshading{bigsphere}}}
   114     \pgftext{%
    39     \pgftext{%
   115       \usebeamerfont*{subitem projected}}
    40       \usebeamerfont*{subitem projected}}
   116   \end{pgfpicture}}
    41   \end{pgfpicture}}
   117   
    42   
   118 % The data files, written on the first run.
       
   119 \begin{filecontents}{compiled.data}
       
   120 %1 0.234146
       
   121 %5000 0.227539
       
   122 %10000 0.280748
       
   123 50000 1.087897
       
   124 100000 3.713165
       
   125 250000 21.6624545
       
   126 500000 85.872613
       
   127 750000 203.6408015
       
   128 1000000 345.736574
       
   129 \end{filecontents}
       
   130 
       
   131 \begin{filecontents}{interpreted.data}
       
   132 %1 0.00503
       
   133 200 1.005863
       
   134 400 7.8296765
       
   135 500 15.43106
       
   136 600 27.2321885
       
   137 800 65.249271
       
   138 1000 135.4493445
       
   139 1200 232.134097
       
   140 1400 382.527227
       
   141 \end{filecontents}
       
   142 
       
   143 \begin{filecontents}{interpreted2.data}
       
   144 %1 0.00503
       
   145 200 1.005863
       
   146 400 7.8296765
       
   147 600 27.2321885
       
   148 800 65.249271
       
   149 1000 135.4493445
       
   150 1200 232.134097
       
   151 1400 382.527227
       
   152 \end{filecontents}
       
   153 
       
   154 \begin{filecontents}{compiled2.data}
       
   155 200 0.222058
       
   156 400 0.215204
       
   157 600 0.202031
       
   158 800 0.21986
       
   159 1000 0.205934
       
   160 1200 0.1981615
       
   161 1400 0.207116
       
   162 \end{filecontents}
       
   163 
       
   164 \begin{document}
    43 \begin{document}
   165 
    44 
   166 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    45 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   167 \mode<presentation>{
    46 \mode<presentation>{
   168 \begin{frame}<1>[t]
    47 \begin{frame}<1>[t]