diff -r 726cefd6a635 -r 562fcdb1ae89 handouts/ho01.tex --- a/handouts/ho01.tex Thu Nov 14 13:50:39 2019 +0000 +++ b/handouts/ho01.tex Fri Nov 15 14:58:16 2019 +0000 @@ -43,8 +43,35 @@ \section*{Handout 1} +The purpose of a compiler is to transform a program a human can read +and write into code the machine can run as fast as +possible. Developping a compiler is an old craft going back to 1952 +with the first compiler written by Grace Hopper. Why studiying +compilers nowadays? An interesting answer is given by John Regher in +his compiler +blog:\footnote{\url{http://blog.regehr.org/archives/1419}} + +\begin{quote}\it{}``We can start off with a couple of observations + about the role of compilers. First, hardware is getting weirder + rather than getting clocked faster: almost all processors are + multicores and it looks like there is increasing asymmetry in + resources across cores. Processors come with vector units, crypto + accelerators, bit twiddling instructions, and lots of features to + make virtualization and concurrency work. We have DSPs, GPUs, + big.little, and Xeon Phi. This is only scratching the + surface. Second, we’re getting tired of low-level languages and + their associated security disasters, we want to write new code, to + whatever extent possible, in safer, higher-level + languages. Compilers are caught right in the middle of these + opposing trends: one of their main jobs is to help bridge the large + and growing gap between increasingly high-level languages and + increasingly wacky platforms. It’s effectively a perpetual + employment act for solid compiler hackers.'' +\end{quote} + + The first part of this module is about text processing, be it for -web-crawlers, compilers, dictionaries, DNA-data, spam-filters and so on. +compilers, dictionaries, DNA-data, spam-filters and so on. When looking for a particular string, say \pcode{"foobar"}, in a large text we can use the Knuth-Morris-Pratt algorithm, which is currently the most efficient general string search algorithm. But often we do