slides/slides08.tex
changeset 215 828303e8e4af
parent 197 6622bd256029
child 306 fecffce112fa
--- a/slides/slides08.tex	Sat Nov 30 00:06:02 2013 +0000
+++ b/slides/slides08.tex	Sun Dec 01 09:58:41 2013 +0000
@@ -1,15 +1,11 @@
 \documentclass[dvipsnames,14pt,t]{beamer}
 \usepackage{beamerthemeplaincu}
-%\usepackage[T1]{fontenc}
-%\usepackage[latin1]{inputenc}
-\usepackage{mathpartir}
 \usepackage[absolute,overlay]{textpos}
 \usepackage{ifthen}
 \usepackage{tikz}
 \usepackage{pgf}
 \usepackage{calc} 
 \usepackage{ulem}
-\usepackage{courier}
 \usepackage{listings}
 \renewcommand{\uline}[1]{#1}
 \usetikzlibrary{arrows}
@@ -21,134 +17,14 @@
 \usetikzlibrary{plotmarks}
 \usepackage{graphicx} 
 \usepackage{pgfplots}
-\setmonofont{Consolas}
-
-\definecolor{javared}{rgb}{0.6,0,0} % for strings
-\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
-\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
-\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
-
-\lstset{language=Java,
-	basicstyle=\ttfamily,
-	keywordstyle=\color{javapurple}\bfseries,
-	stringstyle=\color{javagreen},
-	commentstyle=\color{javagreen},
-	morecomment=[s][\color{javadocblue}]{/**}{*/},
-	numbers=left,
-	numberstyle=\tiny\color{black},
-	stepnumber=1,
-	numbersep=10pt,
-	tabsize=2,
-	showspaces=false,
-	showstringspaces=false}
-
-\lstdefinelanguage{scala}{
-  morekeywords={abstract,case,catch,class,def,%
-    do,else,extends,false,final,finally,%
-    for,if,implicit,import,match,mixin,%
-    new,null,object,override,package,%
-    private,protected,requires,return,sealed,%
-    super,this,throw,trait,true,try,%
-    type,val,var,while,with,yield},
-  otherkeywords={=>,<-,<\%,<:,>:,\#,@},
-  sensitive=true,
-  morecomment=[l]{//},
-  morecomment=[n]{/*}{*/},
-  morestring=[b]",
-  morestring=[b]',
-  morestring=[b]"""
-}
-
-
-\lstset{language=Scala,
-	basicstyle=\ttfamily,
-	keywordstyle=\color{javapurple}\bfseries,
-	stringstyle=\color{javagreen},
-	commentstyle=\color{javagreen},
-	morecomment=[s][\color{javadocblue}]{/**}{*/},
-	numbers=left,
-	numberstyle=\tiny\color{black},
-	stepnumber=1,
-	numbersep=10pt,
-	tabsize=2,
-	showspaces=false,
-	showstringspaces=false}
-
-\lstdefinelanguage{while}{
-  morekeywords={if,then,else,while,do,true,false,write},
-  otherkeywords={=,!=,:=,<,>,;},
-  sensitive=true,
-  morecomment=[n]{/*}{*/},
-}
-
-
-\lstset{language=While,
-	basicstyle=\ttfamily,
-	keywordstyle=\color{javapurple}\bfseries,
-	stringstyle=\color{javagreen},
-	commentstyle=\color{javagreen},
-	morecomment=[s][\color{javadocblue}]{/**}{*/},
-	numbers=left,
-	numberstyle=\tiny\color{black},
-	stepnumber=1,
-	numbersep=10pt,
-	tabsize=2,
-	showspaces=false,
-	showstringspaces=false}
-
+\usepackage{../langs}
+\usepackage{../data}
 
 % beamer stuff 
 \renewcommand{\slidecaption}{AFL 09, King's College London, 20.~November 2013}
 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
 
-
-% The data files, written on the first run.
-\begin{filecontents}{compiled.data}
-%1 0.234146
-%5000 0.227539
-%10000 0.280748
-50000 1.087897
-100000 3.713165
-250000 21.6624545
-500000 85.872613
-750000 203.6408015
-1000000 345.736574
-\end{filecontents}
-
-\begin{filecontents}{interpreted.data}
-%1 0.00503
-200 1.005863
-400 7.8296765
-500 15.43106
-600 27.2321885
-800 65.249271
-1000 135.4493445
-1200 232.134097
-1400 382.527227
-\end{filecontents}
-
-\begin{filecontents}{interpreted2.data}
-%1 0.00503
-200 1.005863
-400 7.8296765
-600 27.2321885
-800 65.249271
-1000 135.4493445
-1200 232.134097
-1400 382.527227
-\end{filecontents}
-
-\begin{filecontents}{compiled2.data}
-200 0.222058
-400 0.215204
-600 0.202031
-800 0.21986
-1000 0.205934
-1200 0.1981615
-1400 0.207116
-\end{filecontents}
-
 \begin{document}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%