slides/slides04.tex
changeset 215 828303e8e4af
parent 145 920f675b4ed1
child 265 332fbe9c91ab
--- a/slides/slides04.tex	Sat Nov 30 00:06:02 2013 +0000
+++ b/slides/slides04.tex	Sun Dec 01 09:58:41 2013 +0000
@@ -1,8 +1,5 @@
 \documentclass[dvipsnames,14pt,t]{beamer}
 \usepackage{beamerthemeplaincu}
-%%%\usepackage[T1]{fontenc}
-\usepackage[latin1]{inputenc}
-\usepackage{mathpartir}
 \usepackage[absolute,overlay]{textpos}
 \usepackage{ifthen}
 \usepackage{tikz}
@@ -22,168 +19,19 @@
 \usetikzlibrary{plotmarks}
 \usetikzlibrary{backgrounds}
 \usepackage{graphicx} 
-
-\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
+\usepackage{../langs}
+\usepackage{../data}
 
 \makeatletter
 \lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}}
 \@empty\z@\@empty
 \makeatother
 
-\lstset{language=Java,
-	basicstyle=\consolas,
-	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=\consolas,
-	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}
-	
-% beamer stuff 
 \renewcommand{\slidecaption}{AFL 04, King's College London, 16.~October 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}{re-python.data}
-1 0.029
-5 0.029
-10 0.029
-15 0.032
-16 0.042
-17 0.042
-18 0.055
-19 0.084
-20 0.136
-21 0.248
-22 0.464
-23 0.899
-24 1.773
-25 3.505
-26 6.993
-27 14.503
-28 29.307
-#29 58.886
-\end{filecontents}
-
-\begin{filecontents}{re-ruby.data}
-1 0.00006
-2 0.00003
-3 0.00001
-4 0.00001
-5 0.00001
-6 0.00002
-7 0.00002
-8 0.00004
-9 0.00007
-10 0.00013
-11 0.00026
-12 0.00055
-13 0.00106
-14 0.00196
-15 0.00378
-16 0.00764
-17 0.01606
-18 0.03094
-19 0.06508
-20 0.12420
-21 0.25393
-22 0.51449
-23 1.02174
-24 2.05998
-25 4.22514
-26 8.42479
-27 16.88678
-28 34.79653
-\end{filecontents}
- 
-\begin{filecontents}{nfa.data}
-0  0.00099
-5  0.01304
-10  0.05350
-15  0.10152
-20  0.10876
-25  0.06984
-30  0.09693
-35  0.04805
-40  0.07512
-45  0.07624
-50  0.10451
-55  0.13285
-60  0.15748
-65  0.19982
-70  0.24075
-75  0.28963
-80  0.35734
-85  0.43735
-90  0.49692
-95  0.59551
-100  0.72236
-\end{filecontents}
-
-\begin{filecontents}{nfasearch.data}
-0  0.00009
-1  0.00147
-2  0.00030
-3  0.00062
-4  0.00132
-5  0.00177
-6  0.00487
-7  0.00947
-8  0.01757
-9  0.02050
-10  0.02091
-11  0.04002
-12  0.08662
-13  0.17269
-14  0.37255
-15  0.81935
-16  1.76254
-17  3.89442
-18  8.42263
-19  17.89661
-20  38.21481
-\end{filecontents}
-
 \begin{document}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%