From: Mart Lubbers Date: Wed, 16 Mar 2016 10:19:36 +0000 (+0100) Subject: removed pdf and finished up the slides X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=f622bae746c1b5b970e7171a2df8f0e6e3fcc5b8;p=cc1516.git removed pdf and finished up the slides --- diff --git a/deliverables/.gitignore b/deliverables/.gitignore index b3a9a94..159912b 100644 --- a/deliverables/.gitignore +++ b/deliverables/.gitignore @@ -6,3 +6,4 @@ *.snm *.toc *.vrb +*.pdf diff --git a/deliverables/p1/Makefile b/deliverables/p1/Makefile index dc5100d..c2f8c38 100644 --- a/deliverables/p1/Makefile +++ b/deliverables/p1/Makefile @@ -1,4 +1,5 @@ LATEX:=pdflatex +LATEXFLAGS:=-shell-escape DOCUMENT:=p1 .PHONY: all clean @@ -7,11 +8,11 @@ DOCUMENT:=p1 all: $(DOCUMENT).pdf %.pdf: %.tex %.fmt - $(LATEX) $(basename $@) - $(LATEX) $(basename $@) + $(LATEX) $(LATEXFLAGS) $(basename $@) + $(LATEX) $(LATEXFLAGS) $(basename $@) %.fmt: pre.tex - $(LATEX) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump" + $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump" clean: $(RM) -v $(addprefix $(DOCUMENT).,aux fmt log nav out snm toc) diff --git a/deliverables/p1/p1.pdf b/deliverables/p1/p1.pdf deleted file mode 100644 index 72bf5b8..0000000 Binary files a/deliverables/p1/p1.pdf and /dev/null differ diff --git a/deliverables/p1/p1.tex b/deliverables/p1/p1.tex index 54708af..67a14b0 100644 --- a/deliverables/p1/p1.tex +++ b/deliverables/p1/p1.tex @@ -98,52 +98,70 @@ eof :: Parser a Void \framesubtitle{Parsing} Added some handy primitives \begin{lstlisting} -parseSColon :: (Parser Token a) -> Parser Token a parseBlock :: Parser Token [Stmt] + parseOpR :: (Parser Token Op2) (Parser Token Expr) -> Parser Token Expr parseOpL :: (Parser Token Op2) (Parser Token Expr) -> Parser Token Expr -parseBBraces :: (Parser Token a) -> Parser Token a -parseBCBraces :: (Parser Token a) -> Parser Token a -parseBSqBraces :: (Parser Token a) -> Parser Token a -trans :: TokenValue (TokenValue -> a) -> Parser Token (Pos, a) + trans2 :: TokenValue (TokenValue -> a) -> Parser Token a trans1 :: TokenValue a -> Parser Token a + peekPos :: Parser Token Pos \end{lstlisting} \end{frame} +\begin{frame}[fragile] + \frametitle{Statistics} + \framesubtitle{Lines of code} + \lstinputlisting{|"wc -l ../../*.[di]cl"} + \pause + \begin{block}{} + \emph{``Measuring programming progress by lines of code is like + measuring aircraft building progress by weight.''}\\ + {---} Bill Gates + \end{block} +\end{frame} + +\begin{frame} + \frametitle{Statistics} + \framesubtitle{Hours of work} + We have no clue how much time we have worked on it\ldots + \pause + \begin{block}{} + \emph{``Choose a job you love, and you will never have to work a day in + your life.''}\\ + {---} Confucius + \end{block} +\end{frame} \section{Examples} +\begin{frame} + \frametitle{Wierd inputs} + \begin{itemize} + \item \pause Heap full + \pause\ldots Increase heap\\ + \texttt{\$ ./spl -h 2000M} + \item \pause Stack full + \pause\ldots Increase stack\\ + \texttt{\$ ./spl -s 200M} + \item \pause Segmentation fault + \pause\ldots Enable memory overcommitting\\ + \texttt{\# echo 1 > /proc/sys/vm/overcommit\_memory} + \item \pause Still segmentation fault + \pause\ldots Buy more \textsc{RAM} + \item \pause Still segmentation fault? + \pause\ldots Divide into modules and parse separatly~\footnote{To be + implemented} + \item \pause Thus, we are only limited by hardware\ldots + \end{itemize} +\end{frame} -%- Anything that is specific to your parser -% - Positions Pim -% - yard (parser combinators) Pim -% - Implementation language Pim -% - Elaborate diffulties and eases (Tussendoor) -% - LL* Mart -%- Did you split it into two phases lexing and parsing, or just one phase? Pim -% - Why parser combinator for lexer -%- Did you change the grammar, and if so how? Mart -% - Standard tricks, remove left assoc, get operator assoc correct. -% - How did you solve the problems of precedence and associativity? -% - Stops, this is design, parsing should be correct!!!1! -%- For a couple of example programs, when you do a sequence of Mart -% 1. parse -% 2. pretty-print -% 3. parse -% 4. pretty-print -% -- Dit gaan we met een shell scriptje doen -%- Code metrics, loc, etc, met stomme xkcd Mart -% How many lines of code do you have, how many hours did you work on it? -% “Measuring programming progress by lines of code is like measuring -% aircraft building progress by weight.” -% -% ― Bill Gates -% Hoeveel uur, ook geen idee. Ook een stomme quote -%- Did you try your parser on weird inputs, like 100 megabyte of nested Mart -%parenthesis? 1 gigabyte? -% - Yes, we did, didn't work out. Uses big heap and stack -%- Problems and learned things -%- Demonstrate your parser and pretty-printer on two or three programs that you -% find interesting Mart (teminaldingen kun jij goed ;)) +\begin{frame} + \frametitle{Learned lessons} + \begin{itemize} + \item \pause Parser combinators are elegant! + \item \pause Positional errors are a must! + \item \ldots + \end{itemize} +\end{frame} \end{document}