Browse Source

VL1: translate into german

Julian Ospald 4 years ago
parent
commit
19abcc037e
No account linked to committer's email address
44 changed files with 215 additions and 210 deletions
  1. 2
    2
      VL1/VL1.tex
  2. 27
    27
      VL1/VL1_document_structure.tex
  3. 1
    1
      VL1/VL1_handout.tex
  4. 3
    3
      VL1/content/VL1_ADT1.tex
  5. 1
    1
      VL1/content/VL1_ADT2.tex
  6. 2
    2
      VL1/content/VL1_ADT3.tex
  7. 3
    3
      VL1/content/VL1_ADT4.tex
  8. 9
    9
      VL1/content/VL1_ADT5.tex
  9. 2
    2
      VL1/content/VL1_ADT6.tex
  10. 1
    1
      VL1/content/VL1_ADT7.tex
  11. 2
    3
      VL1/content/VL1_case_of.tex
  12. 9
    9
      VL1/content/VL1_common_misconceptions.tex
  13. 1
    1
      VL1/content/VL1_declarations.tex
  14. 7
    7
      VL1/content/VL1_difficulties1.tex
  15. 3
    3
      VL1/content/VL1_difficulties2.tex
  16. 5
    5
      VL1/content/VL1_functions_and_control_structures1.tex
  17. 2
    2
      VL1/content/VL1_guards_and_recursion.tex
  18. 12
    12
      VL1/content/VL1_how_to_think_haskell.tex
  19. 4
    4
      VL1/content/VL1_lists1.tex
  20. 2
    2
      VL1/content/VL1_lists2.tex
  21. 3
    3
      VL1/content/VL1_lists3.tex
  22. 5
    5
      VL1/content/VL1_lists4.tex
  23. 3
    3
      VL1/content/VL1_pairs.tex
  24. 3
    3
      VL1/content/VL1_pattern_matching.tex
  25. 1
    1
      VL1/content/VL1_pitfalls.tex
  26. 8
    8
      VL1/content/VL1_questions_for_you.tex
  27. 1
    1
      VL1/content/VL1_questions_from_you.tex
  28. 6
    6
      VL1/content/VL1_toolchain.tex
  29. 4
    4
      VL1/content/VL1_what_does_functional_mean1.tex
  30. 1
    1
      VL1/content/VL1_what_does_functional_mean2.tex
  31. 4
    4
      VL1/content/VL1_what_does_lazy_mean.tex
  32. 10
    10
      VL1/content/VL1_what_does_pure_mean.tex
  33. 2
    2
      VL1/content/VL1_what_does_statically_typed_mean.tex
  34. 1
    1
      VL1/content/VL1_what_is_haskell.tex
  35. 5
    5
      VL1/content/VL1_what_is_haskell_summary.tex
  36. 5
    5
      VL1/content/VL1_what_you_should_know.tex
  37. 11
    11
      VL1/content/VL1_why_haskell1.tex
  38. 8
    8
      VL1/content/VL1_why_haskell2.tex
  39. 9
    9
      VL1/content/VL1_why_haskell3.tex
  40. 5
    5
      VL1/content/VL1_why_haskell4.tex
  41. 6
    6
      VL1/content/VL1_why_haskell5.tex
  42. 6
    0
      common/common_configuration.tex
  43. 6
    6
      common/content/VL_links.tex
  44. 4
    4
      common/content/VL_sources.tex

+ 2
- 2
VL1/VL1.tex View File

@@ -5,14 +5,14 @@
5 5
 % title page information
6 6
 \author{Julian Ospald}
7 7
 \institute{FH Bielefeld}
8
-\title{Haskell: introduction}
8
+\title{Haskell: \ifger{Einführung}{introduction}}
9 9
 
10 10
 \begin{document}
11 11
 
12 12
 \frame{\titlepage}
13 13
 
14 14
 \begin{frame}
15
-\frametitle{Table of Contents}
15
+\frametitle{\ifger{Inhaltsverzeichnis}{Table of Contents}}
16 16
 \tableofcontents[hidesubsections=true]
17 17
 \end{frame}
18 18
 

+ 27
- 27
VL1/VL1_document_structure.tex View File

@@ -1,64 +1,64 @@
1
-\section{Why haskell?}
1
+\section{\ifger{Wieso haskell?}{Why haskell?}}
2 2
 
3 3
 \slidetoc
4 4
 
5 5
 \slide{./content/VL1_why_haskell1.tex}
6 6
 
7
-\subsection{Comparsion C and C++}
7
+\subsection{\ifger{Vergleich mit C und C++}{Comparsion C and C++}}
8 8
 
9 9
 \slide{./content/VL1_why_haskell2.tex}
10 10
 \slide{./content/VL1_why_haskell3.tex}[ (cnt.)]
11 11
 
12
-\subsection{Comparsion Java}
12
+\subsection{\ifger{Vergleich mit Java}{Comparsion Java}}
13 13
 \slide{./content/VL1_why_haskell4.tex}
14 14
 \slide{./content/VL1_why_haskell5.tex}[ (cnt.)]
15 15
 
16 16
 
17
-\section{What is haskell?}
17
+\section{\ifger{Was ist Haskell?}{What is haskell?}}
18 18
 
19 19
 \slidetoc
20 20
 \slide{./content/VL1_what_is_haskell.tex}
21 21
 
22 22
 
23
-\subsection{What does functional mean?}
23
+\subsection{\ifger{Was bedeutet funktional?}{What does functional mean?}}
24 24
 
25 25
 \slide{./content/VL1_what_does_functional_mean1.tex}
26 26
 \slide{./content/VL1_what_does_functional_mean2.tex}
27 27
 
28 28
 
29
-\subsection{What does pure mean?}
29
+\subsection{\ifger{Was bedeutet pure?}{What does pure mean?}}
30 30
 
31 31
 \slide{./content/VL1_what_does_pure_mean.tex}
32 32
 
33
-\subsection{What does lazy mean?}
33
+\subsection{\ifger{Was bedeutet lazy?}{What does lazy mean?}}
34 34
 
35 35
 \slide{./content/VL1_what_does_lazy_mean.tex}
36 36
 
37
-\subsection{What does statically typed mean?}
37
+\subsection{\ifger{Was bedeutet statisch typisiert?}{What does statically typed mean?}}
38 38
 
39 39
 \slide{./content/VL1_what_does_statically_typed_mean.tex}
40 40
 
41
-\subsection{What is haskell, Summary}
41
+\subsection{\ifger{Zusammenfassung: Was ist Haskell?}{Summary: what is haskell?}}
42 42
 
43 43
 \slide{./content/VL1_what_is_haskell_summary.tex}
44 44
 
45
-\section{How to think haskell?}
45
+\section{\ifger{In Haskell denken}{How to think haskell?}}
46 46
 
47 47
 \slide{./content/VL1_how_to_think_haskell.tex}
48 48
 
49
-\section{How to write haskell?}
49
+\section{\ifger{Haskell schreiben}{How to write haskell?}}
50 50
 
51 51
 \slidetoc
52 52
 
53
-\subsection{Declarations}
53
+\subsection{\ifger{Deklarationen}{Declarations}}
54 54
 
55 55
 \slide{./content/VL1_declarations.tex}
56 56
 
57
-\subsection{Arithmetic and co.}
57
+\subsection{\ifger{Arithmetic und co.}{Arithmetic and co.}}
58 58
 
59 59
 \slide{./content/VL1_arithmetic_and_co.tex}
60 60
 
61
-\subsection{Functions and control structures}
61
+\subsection{\ifger{Funktionen und Kontrollstrukturen}{Functions and control structures}}
62 62
 
63 63
 \slidetoc
64 64
 
@@ -72,11 +72,11 @@
72 72
 
73 73
 \slide{./content/VL1_case_of.tex}
74 74
 
75
-\subsubsection{Guards and recursion}
75
+\subsubsection{\ifger{Guards und Rekursion}{Guards and recursion}}
76 76
 
77 77
 \slide{./content/VL1_guards_and_recursion.tex}
78 78
 
79
-\subsection{Lists}
79
+\subsection{\ifger{Listen}{Lists}}
80 80
 
81 81
 \slide{./content/VL1_lists1.tex}
82 82
 \slide{./content/VL1_lists2.tex}[ (cnt.)]
@@ -86,11 +86,11 @@
86 86
 
87 87
 \slide{./content/VL1_lists4.tex}
88 88
 
89
-\subsection{Pairs}
89
+\subsection{\ifger{Tuple/Paare}{Pairs}}
90 90
 
91 91
 \slide{./content/VL1_pairs.tex}
92 92
 
93
-\subsection{Algebraic Data Types}
93
+\subsection{\ifger{Algebraische Datentypen}{Algebraic Data Types}}
94 94
 
95 95
 \slide{./content/VL1_ADT1.tex}
96 96
 \slide{./content/VL1_ADT2.tex}[ (cnt.)]
@@ -102,7 +102,7 @@
102 102
 \slide{./content/VL1_ADT5.tex}
103 103
 \slide{./content/VL1_ADT6.tex}[ (cnt.)]
104 104
 
105
-\subsubsection{ADTs generalized}
105
+\subsubsection{ADTs \ifger{allgemein}{generalized}}
106 106
 
107 107
 \slide{./content/VL1_ADT7.tex}
108 108
 
@@ -110,11 +110,11 @@
110 110
 
111 111
 \slidetoc
112 112
 
113
-\subsection{Questions so far?}
113
+\subsection{\ifger{Fragen soweit?}{Questions so far?}}
114 114
 
115 115
 \slide{./content/VL1_questions_from_you.tex}
116 116
 
117
-\subsection{Common misconceptions}
117
+\subsection{\ifger{Häufige Vorurteile}{Common misconceptions}}
118 118
 
119 119
 \slide{./content/VL1_common_misconceptions.tex}
120 120
 
@@ -122,7 +122,7 @@
122 122
 
123 123
 \slide{./content/VL1_pitfalls.tex}
124 124
 
125
-\subsection{Difficulties}
125
+\subsection{\ifger{Schwierigkeiten}{Difficulties}}
126 126
 
127 127
 \slide{./content/VL1_difficulties1.tex}
128 128
 \slide{./content/VL1_difficulties2.tex}[ (cnt.)]
@@ -131,19 +131,19 @@
131 131
 
132 132
 \slide{./content/VL1_toolchain.tex}
133 133
 
134
-\section{Reflection}
134
+\section{\ifger{Reflexion}{Reflection}}
135 135
 
136 136
 \slidetoc
137 137
 
138
-\subsection{What you should know}
138
+\subsection{\ifger{Was Sie wissen sollten}{What you should know}}
139 139
 
140 140
 \slide{./content/VL1_what_you_should_know.tex}
141 141
 
142
-\subsection{Questions for you}
142
+\subsection{\ifger{Fragen an Sie}{Questions for you}}
143 143
 
144 144
 \slide{./content/VL1_questions_for_you.tex}
145 145
 
146
-\section{References}
146
+\section{\ifger{Referenzen}{References}}
147 147
 
148 148
 \slidetoc
149 149
 
@@ -151,6 +151,6 @@
151 151
 
152 152
 \slide{../common/content/VL_links.tex}
153 153
 
154
-\subsection{Sources}
154
+\subsection{\ifger{Quellen}{Sources}}
155 155
 
156 156
 \slide{../common/content/VL_sources.tex}

+ 1
- 1
VL1/VL1_handout.tex View File

@@ -6,7 +6,7 @@
6 6
 
7 7
 % title page information
8 8
 \author{Julian Ospald}
9
-\title{Haskell: introduction}
9
+\title{Haskell: \ifger{Einführung}{introduction}}
10 10
 
11 11
 \maketitle
12 12
 

+ 3
- 3
VL1/content/VL1_ADT1.tex View File

@@ -1,4 +1,4 @@
1
-Of course we can also define our own data types in haskell. One very common type is the \emph{enumeration}. For example, we could define a data type for the Week:
1
+\ifger{Natürlich können wir auch unsere eigenen Datentypen definieren. Ein sehr häufiger Typ ist die \emph{Enumeration}. Z.b. können wir den Wochentag definieren als:}{Of course we can also define our own data types in haskell. One very common type is the \emph{enumeration}. For example, we could define a data type for the Week:}
2 2
 \begin{haskellcode}
3 3
 data WeekDay = Monday
4 4
              | Tuesday
@@ -8,10 +8,10 @@ data WeekDay = Monday
8 8
              | Saturday
9 9
              | Sunday
10 10
 \end{haskellcode}
11
-This declares the new data type \hinline{WeekDay} with 7 \emph{constructors}. That means \hinline{Monday}, \hinline{Tuesday} etc. are all values of the type \hinline{WeekDay}.
11
+\ifger{Dies erzeugt den neuen Datentyp}{This creates the new data type} \hinline{WeekDay} \ifger{mit}{with} 7 \emph{\ifger{Konstruktoren}{constructors}}. \ifger{Das bedeutet, dass}{That means} \hinline{Monday}, \hinline{Tuesday} etc. \ifger{alles Werte vom Typ}{are all values of the type} \hinline{WeekDay}\ifger{ sind.}{.}
12 12
 \pause
13 13
 \\
14
-We could now define a whole week, by creating a list:
14
+\ifger{Jetzt können wir auch eine ganze Woche definieren mittels einer Liste:}{We could now define a whole week, by creating a list:}
15 15
 \pause
16 16
 \begin{haskellcode}
17 17
 week :: [WeekDay]

+ 1
- 1
VL1/content/VL1_ADT2.tex View File

@@ -1,4 +1,4 @@
1
-And we can again \emph{pattern match} on our \hinline{WeekDay} type. Let's find out if a given day is a Monday:
1
+\ifger{Und auch auf unserem \hinline{WeekDay} Typ können wir \emph{pattern matchen}. Wir wollen z.B. herausfinden, ob ein gegebener Tag ein Montag ist:}{And we can again \emph{pattern match} on our \hinline{WeekDay} type. Let's find out if a given day is a Monday:}
2 2
 \pause
3 3
 \begin{haskellcode}
4 4
 isMonday :: WeekDay -> Bool

+ 2
- 2
VL1/content/VL1_ADT3.tex View File

@@ -1,11 +1,11 @@
1
-But we can do more than enumerations. How about we do some error handling? Let's say we want a function to return an \hinline{Int}, but in case something went horribly wrong, we don't just want to return a 0 or some magic number, but a proper error message. Here we go:
1
+\ifger{Wir können natürlich auch mehr als nur Enumerationen. Wie wäre es mit Fehlerbehandlung? Z.B. wollen wir eine Funktion, die einen Int zurückgibt, aber falls etwas schief gelaufen ist wollen wir nicht einfach nur eine 0 oder einen magischen Wert, sondern eine richtige Fehlernachricht zurückgeben:}{But we can do more than enumerations. How about we do some error handling? Let's say we want a function to return an \hinline{Int}, but in case something went horribly wrong, we don't just want to return a 0 or some magic number, but a proper error message. Here we go:}
2 2
 \pause
3 3
 \begin{haskellcode}
4 4
 data MaybeInt = NoError Int
5 5
               | Error String
6 6
 \end{haskellcode}
7 7
 \pause
8
-So constructors are just \emph{functions}! And they can have arguments, just like functions. Let's check their types:
8
+\ifger{D.h. Konstruktoren sind auch gewöhnliche \emph{Funktionen}! Und sie können Argumente haben, genau wie Funktionen. Hier ist die Typsignatur:}{So constructors are just \emph{functions}! And they can have arguments, just like functions. Let's check their types:}
9 9
 \begin{haskellcode}
10 10
 > :t NoError
11 11
 NoError :: Int -> MaybeInt

+ 3
- 3
VL1/content/VL1_ADT4.tex View File

@@ -1,4 +1,4 @@
1
-And now we can do sanity checks:
1
+\ifger{Und jetzt können wir Sicherheitsabfragen machen:}{And now we can do sanity checks:}
2 2
 \begin{haskellcode}
3 3
 calcSomething :: Int -> MaybeInt
4 4
 calcSomething x
@@ -6,10 +6,10 @@ calcSomething x
6 6
   | otherwise = Error "Int out of range!"
7 7
 \end{haskellcode}
8 8
 \pause
9
-And pattern match on it as well:
9
+\ifger{Und darauf \emph{pattern matchen}}{And pattern match on it as well}:
10 10
 \begin{haskellcode}
11 11
 addIntToList :: MaybeInt -> [Int]
12 12
 addIntToList (NoError x) = [x]
13 13
 addIntToList (Error str) = []
14 14
 \end{haskellcode}
15
-So if we got an error, we just return an empty list, otherwise we return a list with the \hinline{Int} as its only element.
15
+\ifger{D.h. wenn wir hier einen Error bekommen, geben wir einfach eine leere Liste zurück. Ansonsten geben wir die Liste mit dem \hinline{Int} als einziges Element zurück.}{So if we got an error, we just return an empty list, otherwise we return a list with the \hinline{Int} as its only element.}

+ 9
- 9
VL1/content/VL1_ADT5.tex View File

@@ -1,16 +1,16 @@
1
-Let's define something more complex. How about a tree?
1
+\ifger{Jetzt wollen wir etwas komplexere ADTs definieren. Z.b. einen Tree:}{Let's define something more complex. How about a tree?}
2 2
 \pause
3 3
 \begin{haskellcode}
4 4
 data Tree = Leaf Char
5 5
           | Node Tree Int Tree
6 6
 \end{haskellcode}
7
-Uh... that looks mean. Let's examine this.\\
7
+\ifger{Verwirrt? Schauen wir genauer hin.}{Uh... that looks mean. Let's examine this.}\\
8 8
 \pause
9
-We have:
9
+\ifger{Wir haben}{We have}:
10 10
 \begin{itemizep}
11
-\item defined a data type \hinline{Tree}
12
-\item a constructor \hinline{Leaf} of type \hinline{Tree} with one arguments of type \hinline{Char}
13
-\item a constructor \hinline{Node} of type \hinline{Tree} with 3 arguments
11
+\item \ifger{den Datentyp \hinline{Tree} definiert}{defined a data type \hinline{Tree}}
12
+\item \ifger{einen Konstruktor \hinline{Leaf} vom Typ \hinline{Tree} mit einem Argument vom Typ \hinline{Char}}{a constructor \hinline{Leaf} of type \hinline{Tree} with one arguments of type \hinline{Char}}
13
+\item \ifger{einen Konstruktor \hinline{Node} vom Typ \hinline{Tree} mit 3 Argumenten}{a constructor \hinline{Node} of type \hinline{Tree} with 3 arguments}
14 14
 \begin{itemizep}
15 15
 \item \hinline{Tree}
16 16
 \item \hinline{Int}
@@ -18,6 +18,6 @@ We have:
18 18
 \end{itemizep}
19 19
 \end{itemizep}
20 20
 \slidep
21
-That means: a \hinline{Tree} can either be a \hinline{Leaf} or an internal \hinline{Node} with two sub-trees. If we want to create a \hinline{Leaf}, we have to pass the constructor a \hinline{Char}. If we want to create a \hinline{Node}, we have to pass 3 arguments, in order: another \hinline{Tree}, an \hinline{Int} and yet another \hinline{Tree}.\\
22
-So we can save information in the leafs (\hinline{Char}) and in the internal nodes (\hinline{Int}).\\
23
-This is just an example. There are endless more ways of trees.
21
+\ifger{Das bedeutet: ein \hinline{Tree} kann entweder ein \hinline{Leaf} oder eine interne \hinline{Node} sein mit 2 Subtrees. Wollen wir einen \hinline{Leaf} erzeugen, müssen wir dem Konstruktor einen \hinline{Char} übergeben. Wollen wir eine  \hinline{Node} bauen, müssen wir 3 Argumente in Reihenfolge übergeben: ein weiterer \hinline{Tree}, ein \hinline{Int} und noch ein \hinline{Tree}.}{That means: a \hinline{Tree} can either be a \hinline{Leaf} or an internal \hinline{Node} with two sub-trees. If we want to create a \hinline{Leaf}, we have to pass the constructor a \hinline{Char}. If we want to create a \hinline{Node}, we have to pass 3 arguments, in order: another \hinline{Tree}, an \hinline{Int} and yet another \hinline{Tree}.}\\
22
+\ifger{D.h. wir können Informationen sowohl in den leafs (\hinline{Char}) als auch in den internen nodes (\hinline{Int}) speichern. Dies ist nur ein Beispiel.}{So we can save information in the leafs (\hinline{Char}) and in the internal nodes (\hinline{Int}).\\
23
+This is just an example. There are endless more ways of trees.}

+ 2
- 2
VL1/content/VL1_ADT6.tex View File

@@ -1,4 +1,4 @@
1
-Let's build our tree:
1
+\ifger{Wir bauen unseren Tree:}{Let's build our tree:}
2 2
 \begin{haskellcode}
3 3
 tree :: Tree
4 4
 tree = Node
@@ -10,4 +10,4 @@ tree = Node
10 10
             (Leaf 'z')
11 11
        )
12 12
 \end{haskellcode}
13
-See board...
13
+\ifger{Siehe Tafel...}{See board...}

+ 1
- 1
VL1/content/VL1_ADT7.tex View File

@@ -1,4 +1,4 @@
1
-So if we want to generalize it, an algebraic data type has one or more \textbf{constructors}, and each of them can have zero or more arguments. E.g.:
1
+\ifger{D.h. wenn wir verallgemeinern müssten, hat ein algebraischer Datentyp einen oder mehr \textbf{Konstruktoren}, von denen jeder null oder mehr \textbf{Argumente} hat. Z.B.:}{So if we want to generalize it, an algebraic data type has one or more \textbf{constructors}, and each of them can have zero or more \textbf{arguments}. E.g.:}
2 2
 \begin{haskellcode}
3 3
 data AlgDataType = Constr1 Type11 Type12
4 4
                  | Constr2 Type21

+ 2
- 3
VL1/content/VL1_case_of.tex View File

@@ -1,5 +1,4 @@
1
-We can also pattern match on the result of a real expression, not just the input. For that, we write:
2
-
1
+\ifger{Wir können auch auf dem Ergebnis eines Ausdruckes pattern matchen, nicht nur auf Eingabeargumente. Dafür schreiben wir:}{We can also pattern match on the result of a real expression, not just the input. For that, we write:}
3 2
 \begin{haskellcode}
4 3
 f :: Int -> Bool
5 4
 f x = case x - 2 of
@@ -7,4 +6,4 @@ f x = case x - 2 of
7 6
   5 -> True
8 7
   y -> False
9 8
 \end{haskellcode}
10
-This allows more powerful pattern matching, especially when we define our own data structures.
9
+\ifger{Das erlaubt uns etwas mächtigeres pattern matching}{This allows more powerful pattern matching}.

+ 9
- 9
VL1/content/VL1_common_misconceptions.tex View File

@@ -1,7 +1,7 @@
1
-Now that we know the basics, let's clear up some common misconceptions about haskell.
1
+\ifger{Jetzt, da wir die Grundlagen kennen, sollten wir ein paar häufige Missverständnisse ausräumen:}{Now that we know the basics, let's clear up some common misconceptions about haskell.}
2 2
 \begin{itemizep}
3
-\item haskell is only a language for university professors
4
-\item haskell is not used in real world, see \url{https://wiki.haskell.org/Haskell_in_industry}
3
+\item \ifger{Haskell ist eine Sprache nur für Universitätsprofessoren}{haskell is only a language for university professors}
4
+\item \ifger{Haskell wird nicht in der Industrie verwendet, siehe}{haskell is not used in real world, see \url{https://wiki.haskell.org/Haskell_in_industry}}
5 5
 \begin{itemize}
6 6
 \item Microsoft
7 7
 \item NVIDIA
@@ -10,11 +10,11 @@ Now that we know the basics, let's clear up some common misconceptions about has
10 10
 \item Intel
11 11
 \item AT\Q{&}T
12 12
 \end{itemize}
13
-\item you cannot model states in haskell
14
-\item you cannot write larger programs in haskell
15
-\item you cannot write useful programs in haskell
16
-\item you cannot implement imperative algorithms
17
-\item you cannot do concurrency, cryptography, web development, ... in haskell
13
+\item \ifger{man kann keine Zustände in Haskell modellieren}{you cannot model states in haskell}
14
+\item \ifger{man kann keine komplexeren Programme in Haskell schreiben}{you cannot write larger programs in haskell}
15
+\item \ifger{man kann keine nützlichen Programme in Haskell schreiben}{you cannot write useful programs in haskell}
16
+\item \ifger{man kann keine imperativen Algorithmen in Haskell implementieren}{you cannot implement imperative algorithms}
17
+\item \ifger{man kann keine Nebenläufigkeit, Kryptographie, Webdevelopment, ... in Haskell machen}{you cannot do concurrency, cryptography, web development, ... in haskell}
18 18
 \end{itemizep}
19 19
 \slidep
20
-You can!
20
+\ifger{Doch, kann man! Vorführung?}{You can! Need proof?}

+ 1
- 1
VL1/content/VL1_declarations.tex View File

@@ -1,4 +1,4 @@
1
-Let's go!
1
+\ifger{Auf!}{Let's go!}
2 2
 \begin{haskellcode}
3 3
 x :: Int
4 4
 x = 3

+ 7
- 7
VL1/content/VL1_difficulties1.tex View File

@@ -1,9 +1,9 @@
1
-Haskell is very powerful and can be used for pretty much anything. However, there are difficulties in any language. Let's name a few for haskell:
1
+\ifger{Haskell ist sehr mächtig und kann für praktisch alles verwendet werden. Trotzdem hat es wie jede Sprache auch einige Härten bzw. Schwierigkeiten:}{Haskell is very powerful and can be used for pretty much anything. However, there are difficulties in any language. Let's name a few for haskell:}
2 2
 \begin{itemizep}
3
-\item intellectual complexity? New way of thinking?
4
-\item although you rarely need it in haskell, debugging can be difficult at times
5
-\item because the type system is extremely powerful/complex, type error messages can be very confusing and don't always show the error you expected
6
-\item no premium-like IDE with every possible feature (yet)
7
-\item dynamic linking is sort of WIP yet, lots of ABI breakage
8
-\item because most of the world thinks in imperative style languages, it's often difficult to find pseudo-code for functional style languages, so you end up reverse-engineering algorithms
3
+\item \ifger{intellektuelle Komplexität? Neue Art zu Denken?}{intellectual complexity? New way of thinking?}
4
+\item \ifger{obwohl man es selten braucht... debuggen kann unter Umständen schwierig sein}{although you rarely need it in haskell, debugging can be difficult at times}
5
+\item \ifger{da das Typsystem extrem mächtig ist, sind die Fehlermeldungen des type-checkers manchmal verwirrend und zeigen nicht immer den Fehler, den man erwartet hätte}{because the type system is extremely powerful/complex, type error messages can be very confusing and don't always show the error you expected}
6
+\item \ifger{(noch) keine premium-IDE mit allen möglichen features}{no premium-like IDE with every possible feature (yet)}
7
+\item \ifger{dynamisches linking ist noch WIP und man hat sehr häufig ABI-Inkompatibilität}{dynamic linking is sort of WIP yet, lots of ABI breakage}
8
+\item \ifger{da der Groteil der IT in imperativen Programmiersprachen denkt, ist es häufig schwierig pseudo-code für funktionale Sprachen zu finden, weshalb man letztendlich Algorithmen reverse-engineeren muss}{because most of the world thinks in imperative style languages, it's often difficult to find pseudo-code for functional style languages, so you end up reverse-engineering algorithms}
9 9
 \end{itemizep}

+ 3
- 3
VL1/content/VL1_difficulties2.tex View File

@@ -1,5 +1,5 @@
1 1
 \begin{itemizep}
2
-\item some problems that are trivial in imperative languages, can be very difficult to solve in idiomatic haskell and vice versa
3
-\item practical cryptography is possible, but a difficult topic in haskell, see \url{https://mail.haskell.org/pipermail/haskell-cafe/2015-February/118059.html}
4
-\item although haskell is \emph{lazy}, there are a few things that can break laziness, see \url{https://wiki.haskell.org/Maintaining_laziness}
2
+\item \ifger{einige Probleme die trivial in imperativen Sprachen sind, sind sehr schwierig in idiomatischem Haskell zu lösen und umgekehrt}{some problems that are trivial in imperative languages, can be very difficult to solve in idiomatic haskell and vice versa}
3
+\item \ifger{praktische Kryptographie ist möglich, aber ein schwieriges Thema, siehe}{practical cryptography is possible, but a difficult topic in haskell, see}\footnote{\url{https://mail.haskell.org/pipermail/haskell-cafe/2015-February/118059.html}}
4
+\item \ifger{obwohl Haskell \emph{lazy} ist, gibt es ein paar Dinge, die laziness zunichte machen können, siehe auch}{although haskell is \emph{lazy}, there are a few things that can break laziness, see}\footnote{\url{https://wiki.haskell.org/Maintaining_laziness}}
5 5
 \end{itemizep}

+ 5
- 5
VL1/content/VL1_functions_and_control_structures1.tex View File

@@ -1,10 +1,10 @@
1
-Let's make our first function. We want something like the following mathematical function\\
1
+\ifger{Schreiben wir unsere erste Funktion. Wir wollen etwas wie die folgende mathematische Funktion:}{Let's make our first function. We want something like the following mathematical function}\\
2 2
 $f(x) = x * x$
3 3
 \vspace{\baselineskip}
4 4
 \\
5
-How could the haskell code look like?
5
+\ifger{Wie könnte der Haskell code aussehen?}{How could the haskell code look like?}
6 6
 \pause
7
-Almost the same:
7
+\ifger{Beinahe genauso:}{Almost the same:}
8 8
 \begin{haskellcode}
9 9
 f x = x * x
10 10
 \end{haskellcode}
@@ -13,9 +13,9 @@ GHCi...
13 13
 \pause
14 14
 \vspace{\baselineskip}
15 15
 \\
16
-What is a possible type signature for this function?
16
+\ifger{Was ist eine mögliche Typsignatur dieser Funktion?}{What is a possible type signature for this function?}
17 17
 \begin{haskellcode}
18 18
 f :: Int -> Int
19 19
 f x = x * x
20 20
 \end{haskellcode}
21
-So the function gets an Int and returns an Int. Don't get confused by "\verb|->|". Just think of it as a symbol for separating input and output.
21
+\ifger{Also, die Funktion bekommt einen \hinline{Int} als Eingabe und gibt einen \hinline{Int} als Ausgabe zurück. Lasst Euch nicht von}{So the function gets an \hinline{Int} and returns an \hinline{Int}. Don't get confused by} \hinline{->} \ifger{verwirren.}{.} \ifger{Seht es einfach als Symbol zum Trennen von Eingabe und Ausgabe}{Just think of it as a symbol for separating input and output}.

+ 2
- 2
VL1/content/VL1_guards_and_recursion.tex View File

@@ -1,4 +1,4 @@
1
-How about \emph{recursion}? Let's define the modulo of any \emph{Int} to \emph{2}.
1
+\ifger{Wie sieht es mit \emph{Rekursion} aus? Wir wollen den Modulo von einem beliebigen \emph{Int} zu \emph{2} definieren.}{How about \emph{recursion}? Let's define the modulo of any \emph{Int} to \emph{2}.}
2 2
 \pause
3 3
 \begin{haskellcode}
4 4
 mod2 :: Int -> Int
@@ -7,4 +7,4 @@ mod2 x
7 7
   | x - 2 < 0  = x
8 8
   | otherwise  = mod2 (x - 2)
9 9
 \end{haskellcode}
10
-These \verb#|# things above are called \textbf{guards} and are similar to \emph{pattern matching}. They are processed in order. If the condition on the left side of the equation is true, then it returns what stands on the right side of the equation. If it's false, then it processes the next line.\\ \hinline{otherwise} on the last line is just defined as \hinline{True}, to make these constructs easier to read and catch all other cases of input.
10
+\ifger{Diese}{These} \hinline{|} \ifger{Zeichen nennt man \textbf{guards} und sie sind dem \emph{pattern matching} sehr ähnlich. Sie werden von oben nach unten abgearbeitet. Wenn die Bedingung auf der linken Seite der Gleichung wahr ist, dann gibt die gesamte Funktion das heraus, was auf der rechten Seite der Gleichung steht. Ansonsten wird die nächste Zeile ausprobiert. \hinline{otherwise} in der letzten Zeile ist lediglich \hinline{True}, um dieses Konstrukt lesbarer zu machen und fungiert quasi als allgemeines \emph{else}.}{things above are called \textbf{guards} and are similar to \emph{pattern matching}. They are processed in order. If the condition on the left side of the equation is true, then it returns what stands on the right side of the equation. If it's false, then it processes the next line.\\ \hinline{otherwise} on the last line is just defined as \hinline{True}, to make these constructs easier to read and catch all other cases of input.}

+ 12
- 12
VL1/content/VL1_how_to_think_haskell.tex View File

@@ -1,19 +1,19 @@
1 1
 \begin{itemizep}
2
-\item forget about imperative, procedural, OOP; forget about any programming language
3
-\item think in types!
2
+\item \ifger{vergesst was Ihr über imperative, prozedurale oder OOP basierte Sprachen wisst... am besten vergesst alles, was Ihr über Programmiersprachen wisst}{forget about imperative, procedural, OOP; forget about any programming language}
3
+\item \ifger{denkt in Typen!}{think in types!}
4 4
 \begin{itemizep}
5
-\item don't be afraid of type errors
6
-\item let the type-checker do the work for you (does this function do what I think it does?)
7
-\item understand functions just by looking at their type signature?
5
+\item \ifger{keine Angst vor Typfehlern!}{don't be afraid of type errors}
6
+\item \ifger{lass den type-checker die ganze Arbeit tun (macht diese Funktion auch das, was ich denke?)}{let the type-checker do the work for you (does this function do what I think it does?)}
7
+\item \ifger{Funktionen nur durch das Lesen ihrer Typsignatur verstehen?}{understand functions just by looking at their type signature?}
8 8
 \end{itemizep}
9
-\item think abstract!
9
+\item \ifger{abstrakt denken!}{think abstract!}
10 10
 \begin{itemizep}
11 11
 \item don't repeat yourself!
12
-\item "develop a solution space, rather than an individual solution" -- Ralf Hinze
13
-\item "imagine a graph, rather than a single path" -- Ralf Hinze
14
-\item "first solve a more general problem, then extract the interesting bits and pieces by transforming the general program into more specialised ones" -- Ralf Hinze
12
+\item ''develop a solution space, rather than an individual solution'' -- Ralf Hinze
13
+\item ''imagine a graph, rather than a single path'' -- Ralf Hinze
14
+\item ''first solve a more general problem, then extract the interesting bits and pieces by transforming the general program into more specialised ones'' -- Ralf Hinze
15 15
 \end{itemizep}
16
-\item solve atomic parts of general problems and combine them into greater solutions
17
-\item don't be afraid of recursion!
18
-\item write less, think more!
16
+\item \ifger{löse atomare Teile eines größeren Problems und kombiniere die Einzellösungen zu größeren Lösungen zusammen}{solve atomic parts of general problems and combine them into greater solutions}
17
+\item \ifger{keine Angst vor Rekursion!}{don't be afraid of recursion!}
18
+\item \ifger{weniger schreiben, mehr denken!}{write less, think more!}
19 19
 \end{itemizep}

+ 4
- 4
VL1/content/VL1_lists1.tex View File

@@ -1,12 +1,12 @@
1
-The list is probably the most basic data structure in Haskell. Like the array in C. It is a singly-linked list and is very lazy. The compiler has numerous ways to optimize lists, so don't be afraid to use them, even for huge things.
1
+\ifger{Die Liste ist vermutlich der grundlegendste Datentyp in Haskell, ähnlich wie das Array in C. Sie ist singly-linked und lazy. Der Compiler beherrscht viele Tricks, die Liste zu optimieren, deshalb kann man sie auch für komplexere Probleme benutzen.}{The list is probably the most basic data structure in Haskell. Like the array in C. It is a singly-linked list and is very lazy. The compiler has numerous ways to optimize lists, so don't be afraid to use them, even for huge things.}
2 2
 \pause
3
-We build lists by using either the \hinline{[]} notation:
3
+\ifger{Wir erzeugen Listen entweder mit der}{We build lists by using either the} \hinline{[]} \ifger{Notation:}{notation:}
4 4
 \begin{haskellcode}
5 5
 list1 :: [Integer]
6 6
 list1 = [1, 2]
7 7
 \end{haskellcode}
8 8
 \pause
9
-or by using the \emph{cons} operator \hinline{(:)} which takes an element and a list and produces a new list with the element prepended to the front.
9
+\ifger{oder mit dem}{or by using the} \emph{cons} \ifger{Operator}{operator} \hinline{(:)} \ifger{welcher  ein Element nimmt und es an den Anfang einer Liste setzt und somit eine neue Liste erzeugt.}{which takes an element and a list and produces a new list with the element prepended to the front.}
10 10
 \begin{haskellcode}
11 11
 emptyList = []
12 12
 
@@ -16,7 +16,7 @@ list2 = 1 : []
16 16
 list3 = [1, 2] == 1 : 2 : []
17 17
 \end{haskellcode}
18 18
 \pause
19
-How about something more interesting:
19
+\ifger{Wie wäre es mit etwas interessanterem:}{How about something more interesting:}
20 20
 \begin{haskellcode}
21 21
 infiniteList = [1..]
22 22
 \end{haskellcode}

+ 2
- 2
VL1/content/VL1_lists2.tex View File

@@ -1,4 +1,4 @@
1
-Let's check on a few very common list operations:
1
+\ifger{Ein paar häufig verwendete List-Operationen}{Let's check on a few very common list operations:}
2 2
 \begin{haskellcode*}{bgcolor=mygrey,frame=single,numbers=none,label=GHCi}
3 3
 > [1, 2] ++ [4, 5]  -- append two lists
4 4
 > head [1, 2, 3]    -- first element
@@ -10,7 +10,7 @@ Let's check on a few very common list operations:
10 10
 > elem 7 [1, 2, 3]  -- is there a 7 in the list?
11 11
 \end{haskellcode*}
12 12
 \pause
13
-A String in haskell is just a list of Chars!
13
+\ifger{Ein String in Haskell ist einfach nur eine Liste von Chars!}{A String in haskell is just a list of Chars!}
14 14
 \begin{haskellcode*}{bgcolor=mygrey,frame=single,numbers=none,label=GHCi}
15 15
 > ['a', 'b', 'c']
16 16
 > 'a' : []

+ 3
- 3
VL1/content/VL1_lists3.tex View File

@@ -1,15 +1,15 @@
1
-Again, we can do pattern matching on lists.
1
+\ifger{Erneut können wir pattern matching anwenden, auch auf Listen.}{Again, we can do pattern matching on lists.}
2 2
 \begin{haskellcode}
3 3
 listLen :: [Integer] -> Integer
4 4
 listLen [] = 0
5 5
 listLen (x:xs) = 1 + listLen xs
6 6
 \end{haskellcode}
7 7
 \pause
8
-We can also nest pattern matching:
8
+\ifger{Pattern matching können wir auch schachteln:}{We can also nest pattern matching:}
9 9
 \begin{haskellcode}
10 10
 sumEveryTwo :: [Integer] -> [Integer]
11 11
 sumEveryTwo []         = 0
12 12
 sumEveryTwo (x:[])     = [x]
13 13
 sumEveryTwo (x:(y:zs)) = (x + y) : sumEveryTwo zs
14 14
 \end{haskellcode}
15
-Note that \hinline{(x:(y:zs))} may also be written as \hinline{(x:y:zs)}.
15
+\ifger{Hinweis...}{Note that} \hinline{(x:(y:zs))} \ifger{kann man auch als}{may also be written as} \hinline{(x:y:zs)}\ifger{ schreiben.}{.}

+ 5
- 5
VL1/content/VL1_lists4.tex View File

@@ -1,19 +1,19 @@
1
-Haskell also supports \textbf{list comprehension} which is basically syntactic sugar for what we already know from maths.\\
2
-Let's define a set that contains the first ten even natural numbers:\\
1
+\ifger{Haskell erlaubt auch}{Haskell also supports} \textbf{list comprehension} \ifger{, was eigentlich nur Syntaxsugar ist und der mathematischen Schreibweise sehr ähnelt.}{which is basically syntactic sugar for what we already know from maths.}\\
2
+\ifger{Wir wollen ein Set definieren, das die ersten 10 geraden Zahlen beinhaltet:}{Let's define a set that contains the first ten even natural numbers:}\\
3 3
 \pause
4 4
 $S = \{2 \times x\ |\ x \in \mathbb{N},\ x \leq 10\}$
5 5
 \vspace{\baselineskip}
6 6
 \pause
7 7
 \\
8
-How does this look in haskell?
8
+\ifger{Wie könnte das in Haskell aussehen?}{How does this look in haskell?}
9 9
 \pause
10 10
 \begin{haskellcode*}{bgcolor=mygrey,frame=single,numbers=none,label=GHCi}
11 11
 > [ 2 * x | x <- [1..10]]
12 12
 \end{haskellcode*}
13 13
 \pause
14
-Now let's say we want all numbers between 50 and 100 that have the remainder 0 when divided by 12:
14
+\ifger{Jetzt wollen wir alle Zahlen zwischen 50 und 100 die als Rest 0 haben, wenn wir sie modulo 12 nehmen:}{Now let's say we want all numbers between 50 and 100 that have the remainder 0 when divided by 12:}
15 15
 \pause
16 16
 \begin{haskellcode*}{bgcolor=mygrey,frame=single,numbers=none,label=GHCi}
17 17
 > [x | x <- [50..100], mod x 12 == 0]
18 18
 \end{haskellcode*}
19
-\hinline{x <- [50..100]} is the binding, while \hinline{mod x 12 == 0} is the predicate, separated by a comma. We can have multiple predicates.
19
+\hinline{x <- [50..100]} \ifger{ist das Binding, während}{is the binding, while} \hinline{mod x 12 == 0} \ifger{das Prädikat ist}{is the predicate}, \ifger{getrennt durch ein Komma}{separated by a comma}. \ifger{Wir können mehrere Prädikate haben}{We can have multiple predicates.}

+ 3
- 3
VL1/content/VL1_pairs.tex View File

@@ -1,11 +1,11 @@
1
-Defining a pair is easy.
1
+\ifger{Ein Tuple zu definieren ist leicht:}{Defining a pair is easy.}
2 2
 \begin{haskellcode}
3 3
 p :: (Int, Char) -- this is the type
4
-p = (2, 'y') -- this is how we construct the pair
4
+p = (2, 'y')     -- this is how we construct the pair
5 5
 
6 6
 -- pattern matching against pairs
7 7
 sumPair :: (Int, Int) -> Int
8 8
 sumPair (x, y) = x + y
9 9
 \end{haskellcode}
10 10
 \pause
11
-Note: we use \hinline{(x, y)} notation for both the type and the definition! Those are still two different things. We can also have triples, quadruples etc.
11
+\ifger{Hinweis: wir benutzen}{Note: we use} \hinline{(x, y)} \ifger{als Notation sowohl für den Typ als auch die Definition! Dies sind trotzdem 2 verschiedene Dinge. Wir können auch Triple, Quadruple etc. haben.}{notation for both the type and the definition! Those are still two different things. We can also have triples, quadruples etc.}

+ 3
- 3
VL1/content/VL1_pattern_matching.tex View File

@@ -1,4 +1,4 @@
1
-In haskell we often use \textbf{pattern matching}. That means we define a function multiple times, but e.g. for different values of its input arguments. Let's see:
1
+\ifger{In Haskell wird häufig das sogenannte}{In haskell we often use} \textbf{pattern matching}\ifger{ benutzt.}{.} \ifger{Das bedeutet, dass wir eine Funktion mehrmals definieren, aber z.b. für unterschiedliche Werte ihrer Eingabeargumente. Ungefähr so:}{That means we define a function multiple times, but e.g. for different values of its input arguments. Let's see:}
2 2
 \pause
3 3
 \begin{haskellcode}
4 4
 isZero :: Int -> Bool
@@ -6,8 +6,8 @@ isZero 0 = True
6 6
 isZero x = False
7 7
 \end{haskellcode}
8 8
 \vspace{\baselineskip}
9
-So if we pass it 0, we get True. If we do not pass 0, we get False and the value we passed gets basically ignored.
9
+\ifger{D.h. wenn wir eine \hinline{0} übergeben, bekommen wir \hinline{True} zurück. Wenn wir keine \hinline{0} übergeben, dann bekommen wir \hinline{False} zurück und der Eingabewert wird quasi nicht weiter betrachtet.}{So if we pass it \hinline{0}, we get \hinline{True}. If we do not pass \hinline{0}, we get \hinline{False} and the value we passed gets basically ignored.}
10 10
 \vspace{\baselineskip}
11 11
 \\
12 12
 \pause
13
-What might happen if we remove the second or the third line? What is a \textbf{partial function} and a \textbf{total function}?
13
+\ifger{Was könnte passieren wenn wir die 2. oder 3. Zeile löschen? Was ist eine}{What might happen if we remove the second or the third line? What is a} \textbf{partial function} \ifger{und eine}{and a} \textbf{total function}?

+ 1
- 1
VL1/content/VL1_pitfalls.tex View File

@@ -1,3 +1,3 @@
1 1
 \begin{itemizep}
2
-\item none...
2
+\item \ifger{keine}{none}...
3 3
 \end{itemizep}

+ 8
- 8
VL1/content/VL1_questions_for_you.tex View File

@@ -1,13 +1,13 @@
1 1
 \begin{itemize}
2
-\item What are side effects?
3
-\item What is referential transparency?
4
-\item Can you have referential transparency with side effects?
5
-\item What does the output of a haskell function depend on?
6
-\item What is laziness?
7
-\item When are types checked in haskell?
8
-\item What are the differences between lists and pairs?
2
+\item \ifger{was sind Seiteneffekte?}{What are side effects?}
3
+\item \ifger{was ist referenzielle Transparenz?}{What is referential transparency?}
4
+\item \ifger{kann ich referenzielle Transparenz mit Seiteneffekten haben?}{Can you have referential transparency with side effects?}
5
+\item \ifger{wovon hängt die Ausgabe einer Haskell Funktion ab?}{What does the output of a haskell function depend on?}
6
+\item \ifger{was ist}{What is} laziness?
7
+\item \ifger{Wann werden Typen in Haskell geprüft?}{When are types checked in haskell?}
8
+\item \ifger{Was sind die Unterschiede zwischen Listen und Tuplen?}{What are the differences between lists and pairs?}
9 9
 \end{itemize}
10
-Does this compile? If not, fix it. Is this a total or a partial function?
10
+\ifger{Ist dies eine \emph{total} oder eine \emph{partial} Funktion? Wie müsste man sie eventuell umschreiben?}{Is this a total or a partial function? Would you extend it? How?}
11 11
 \begin{haskellcode}
12 12
 data IntOrDouble = MkDouble Double
13 13
                  | MkInt Int

+ 1
- 1
VL1/content/VL1_questions_from_you.tex View File

@@ -1,4 +1,4 @@
1 1
 \begin{itemize}
2
-\item How do functions with multiple parameters look like?
2
+\item \ifger{Wie sehen Funktionen mit mehreren Argumenten aus?}{How do functions with multiple arguments look like?}
3 3
 \item ...
4 4
 \end{itemize}

+ 6
- 6
VL1/content/VL1_toolchain.tex View File

@@ -1,8 +1,8 @@
1
-How to get started? You need:
1
+\ifger{Um loszulegen benötigen wir:}{How to get started? You need:}
2 2
 \begin{itemize}
3
-\item \textbf{GHC}: this is the Haskell compiler
4
-\item \textbf{GHCi}: this an interactive environment of GHC, similar to the interactive ruby shell \emph{irb}
5
-\item \textbf{The Haskell Platform}: a collection including GHC, GHCi and basic libraries
3
+\item \textbf{GHC}: \ifger{das ist der Haskell Compiler}{this is the Haskell compiler}
4
+\item \textbf{GHCi}: \ifger{das ist die interaktive Compiler-Umgebung, ähnlich der ruby shell \emph{irb}}{this an interactive environment of GHC, similar to the interactive ruby shell \emph{irb}}
5
+\item \textbf{The Haskell Platform}: \ifger{eine Kollektion die GHC, GHCi und Standardbibliotheken beinhaltet}{a collection including GHC, GHCi and basic libraries}
6 6
 \end{itemize}
7
-Go to \url{https://www.haskell.org/platform}\\
8
-For haskell IDEs, see \url{https://wiki.haskell.org/IDEs}
7
+\ifger{Siehe}{Go to}\footnote{\url{https://www.haskell.org/platform}}\\
8
+\ifger{Für Haskell IDEs, siehe}{For haskell IDEs, see}\footnote{\url{https://wiki.haskell.org/IDEs}}

+ 4
- 4
VL1/content/VL1_what_does_functional_mean1.tex View File

@@ -1,13 +1,13 @@
1
-Think of haskell functions as regular \emph{mathematical} functions.
1
+\ifger{Stell dir Haskell Funktionen als ganz normale \emph{mathematische Funktionen} vor.}{Think of haskell functions as regular \emph{mathematical} functions.}
2 2
 \slidep
3 3
 \vspace{\baselineskip}
4 4
 \begin{center}
5 5
 \includegraphics*[scale=0.35]{./images/function-machine.png}
6 6
 \end{center}
7 7
 \begin{itemizep}
8
-\item does this function write to the hard drive?
9
-\item does the output depend on anything else except the input (e.g. time, environment, ...)?
8
+\item \ifger{schreibt diese Funktion auf die Festplatte?}{does this function write to the hard drive?}
9
+\item \ifger{hängt die Ausgabe von irgendetwas ausser der Eingabe ab (z.b. Zeit, Umgebung...)?}{does the output depend on anything else except the input (e.g. time, environment, ...)?}
10 10
 \end{itemizep}
11 11
 \slidep
12 12
 \vspace{\baselineskip}
13
-It's all about \emph{input} and \emph{output} of functions! And that's it. Nothing else to worry about.
13
+\ifger{Es geht tatsächlich nur um \emph{Eingabe} und \emph{Ausgabe} von Funktionen. Und sonst nichts! Wir haben keine anderen Sorgen.}{It's all about \emph{input} and \emph{output} of functions! And that's it. Nothing else to worry about.}

+ 1
- 1
VL1/content/VL1_what_does_functional_mean2.tex View File

@@ -1,4 +1,4 @@
1
-So, functional means:
1
+\ifger{Funktional bedeutet:}{So, functional means:}
2 2
 \begin{itemizep}
3 3
 \item \emph{first-class} citizens: functions are values and can be used as such
4 4
 \item a haskell program is what happens when \emph{expressions are evaluated}, it's not about executing instructions

+ 4
- 4
VL1/content/VL1_what_does_lazy_mean.tex View File

@@ -1,7 +1,7 @@
1
-In haskell expressions are not evaluated until their results are actually needed. That has a lot of consequences, a few of them being:
1
+\ifger{Ausdrücke in Haskell werden erst evaluiert, wenn ihr Ergebnis tatsächlich benötigt wird. Das bringt viele Konsequenzen mit sich. Einige davon sind:}{In haskell expressions are not evaluated until their results are actually needed. That has a lot of consequences, a few of them being:}
2 2
 \slidep
3 3
 \begin{itemizep}
4
-\item infinite data structures are now possible (recursive and non-recursive)
5
-\item defining new control structures by just defining a function (since not everything is evaluated... who needs if-then-else anyway?)
6
-\item important for compositional programming and efficiency
4
+\item \ifger{unendliche Datenstrukturen sind möglich, sowohl rekursive als auch nicht-rekursive}{infinite data structures are now possible (recursive and non-recursive)}
5
+\item \ifger{neue Kontrollstrukturen können sehr leicht durch Definieren von Funktionen erzeugt werden, wir benötigen nicht unbedingt if-then-else}{defining new control structures by just defining a function (since not everything is evaluated... who needs if-then-else anyway?)}
6
+\item \ifger{sehr wichtig für die Programmierung mit Komposition (z.b. Funktionskomposition) und Effizienz}{important for compositional programming and efficiency}
7 7
 \end{itemizep}

+ 10
- 10
VL1/content/VL1_what_does_pure_mean.tex View File

@@ -1,19 +1,19 @@
1
-\emph{Referential transparency}, as in:
1
+\emph{\ifger{Referenzielle Transparenz}{Referential transparency}}, \ifger{also}{as in}:
2 2
 \slidep
3 3
 \begin{itemizep}
4
-\item everything (variables, data structures...) is \emph{immutable}
5
-\item expressions never have side-effects (remember: mathematical functions)
6
-\item same input $\mapsto$ same output... \emph{always}!
7
-\item replace a function with it's (return) value? Yes. What happens in C or java if you do that? Remember \cppinline{void pop();}?
4
+\item \ifger{alles (Variablen, Datenstrukturen)}{everything (variables, data structures...)} \ifger{ist}{is} \emph{immutable}
5
+\item \ifger{Ausdrücke haben niemals Seiteneffekte (Erinnerung: mathematische Funktionen)}{expressions never have side-effects (remember: mathematical functions)}
6
+\item \ifger{gleiche Eingabe}{same input} $\mapsto$ \ifger{gleiche Ausgabe}{same output}... \emph{\ifger{immer}{always}}!
7
+\item \ifger{wir können eine Funktion mit ihrem (Rückgabe-)Wert ersetzen... was passiert, wenn wir das in C oder java tun? (Erinnerung:}{replace a function with it's (return) value? Yes. What happens in C or java if you do that? Remember} \cppinline{void pop();}\ifger{)}{?}
8 8
 \end{itemizep}
9 9
 \slidep
10 10
 \vspace{\baselineskip}
11
-possible benefits?
11
+\ifger{mögliche Vorteile?}{possible benefits?}
12 12
 \begin{itemizep}
13
-\item parallelism
14
-\item equational reasoning and refactoring
15
-\item less bugs!
13
+\item \ifger{Parallelisierung}{parallelism}
14
+\item \ifger{Denken in Gleichungen und hohes Refactoring-Potenzial}{equational reasoning and refactoring}
15
+\item \ifger{weniger Bugs!}{less bugs!}
16 16
 \end{itemizep}
17 17
 \slidep
18 18
 \vspace{\baselineskip}
19
-Question: call-by-value? call-by-reference? call-by-need?
19
+\ifger{Frage:}{Question:} call-by-value? call-by-reference? call-by-need?

+ 2
- 2
VL1/content/VL1_what_does_statically_typed_mean.tex View File

@@ -1,4 +1,4 @@
1
-Every haskell expression has a type and types are always checked at \emph{compile-time}. Programs with errors will not compile and definitely not run.
1
+\ifger{Jeder Haskell Ausdruck hat einen Typ und Typen werden immer zur \emph{Kompilierzeit} geprüft}{Every haskell expression has a type and types are always checked at \emph{compile-time}}. \ifger{Programme mit Typfehlern werden nicht kompilieren und erst recht nicht laufen.}{Programs with errors will not compile and definitely not run.}
2 2
 \vspace{\baselineskip}
3 3
 \\
4
-It is possible to simulate dynamic types however, i.e. types which may be converted to the type you need them in, following rigid rules. In the end, they are still statically type-checked (as in: the compiler always knows what's going on).
4
+\ifger{Es ist jedoch möglich dynamische Typen zu simulieren. D.h. Typen, die wir zu den Typen konvertieren möchten, die wir gerade brauchen. Dabei müssen allerdings sehr starre Regeln eingehalten werden. Am Ende gilt, dass wir trotzdem statische Typisierung haben (also: der Compiler weiss immer was los ist)}{It is possible to simulate dynamic types however, i.e. types which may be converted to the type you need them in, following rigid rules. In the end, they are still statically type-checked (as in: the compiler always knows what's going on).}

+ 1
- 1
VL1/content/VL1_what_is_haskell.tex View File

@@ -2,4 +2,4 @@ Haskell is a \textbf{functional}, \textbf{pure}, \textbf{lazy} and \textbf{stati
2 2
 \vspace{\baselineskip}
3 3
 \pause
4 4
 \\
5
-A few of the following facts will be white lies. But let's not worry about that. It's maybe more about "how to think in terms of haskell?" than "what is haskell?".
5
+\ifger{Ein paar der folgenden Dinge werden vermutlich Notlügen sein. Aber das soll uns nicht weiter stören. Es geht uns mehr um die Frage "Wie denke ich in Haskell"\ als "Was genau ist Haskell?".}{A few of the following facts will be white lies. But let's not worry about that. It's maybe more about "how to think in terms of haskell?" than "what is haskell?".}

+ 5
- 5
VL1/content/VL1_what_is_haskell_summary.tex View File

@@ -1,9 +1,9 @@
1
-Let's reiterate. Haskell is:
1
+\ifger{Um zusammenzufassen, Haskell ist...}{Let's reiterate. Haskell is:}
2 2
 \begin{itemize}
3
-\item functional
3
+\item \ifger{funktional}{functional}
4 4
 \item pure
5 5
 \item lazy
6
-\item statically typed (and truly type-safe)
7
-\item even garbage collected
8
-\item the world's finest imperative language (what??)
6
+\item \ifger{statisch typisiert (und typsicher)}{statically typed (and truly type-safe)}
7
+\item \ifger{sogar}{even} garbage collected
8
+\item \ifger{die beste imperative Programmiersprache der Welt (was??)}{the world's finest imperative language (what??)}
9 9
 \end{itemize}

+ 5
- 5
VL1/content/VL1_what_you_should_know.tex View File

@@ -1,7 +1,7 @@
1 1
 \begin{itemize}
2
-\item what haskell is
3
-\item how you write haskell functions
4
-\item how you handle lists and pairs
5
-\item how you do pattern matching
6
-\item how you create your own data types
2
+\item \ifger{was ist Haskell und seine Vorteile?}{what haskell is and what advantages does it provide?}
3
+\item \ifger{wie schreibe ich Haskell Funktionen?}{how you write haskell functions?}
4
+\item \ifger{wie gehe ich mit Listen und Tuplen um?}{how you handle lists and pairs?}
5
+\item \ifger{wie funktioniert pattern matching?}{how you do pattern matching?}
6
+\item \ifger{wie man seine eigenen Datentypen definiert}{how you create your own data types}
7 7
 \end{itemize}

+ 11
- 11
VL1/content/VL1_why_haskell1.tex View File

@@ -1,15 +1,15 @@
1
-A Haskeller might claim: haskell...
1
+\ifger{Ein Haskeller könnte behaupten: Haskell...}{A Haskeller might claim: haskell...}
2 2
 \begin{itemizep}
3
-\item eliminates certain classes of bugs
4
-\item not only disallows bad programs, but also defines what constitutes a bad program
5
-\item makes it easy to reason about code
6
-\item decreases the bus-factor
7
-\item makes it possible to apply huge changes to large programs without worrying about the implicit state machine
8
-\item makes it easier to program complex problems
9
-\item allows for clean APIs, even without any OOP
10
-\item a haskell program of 10K LOC isn't that much different to maintain as a 100K LOC
11
-\item refactoring in haskell means abstraction
3
+\item \ifger{eliminiert eine ganze Klasse von bugs}{eliminates certain classes of bugs}
4
+\item \ifger{weist schlechte Programme nicht nur zurück, sondern definiert auch was ein schlechtes Programm ausmacht}{not only disallows bad programs, but also defines what constitutes a bad program}
5
+\item \ifger{macht es einfach Schlussfolgerungen innerhalb von Programmen zu ziehen}{makes it easy to reason about code}
6
+\item \ifger{verringert den Bus-Faktor}{decreases the bus-factor}
7
+\item \ifger{erlaubt es tiefgreifende Änderungen an Programmen zu machen ohne sich über den impliziten Zustandsautomaten Gedanken zu machen}{makes it possible to apply huge changes to large programs without worrying about the implicit state machine}
8
+\item \ifger{macht es einfacher komplexe Probleme zu lösen}{makes it easier to solve complex problems}
9
+\item \ifger{erlaubt saubere APIs, sogar ohne OOP}{allows for clean APIs, even without any OOP}
10
+\item \ifger{ein Haskell Programm mit 10k LOC ist von der Wartung her nicht anders als 100k LOC}{a haskell program of 10K LOC isn't that much different to maintain as a 100K LOC}
11
+\item \ifger{Refactoring in Haskell bedeutet Abstraktion}{refactoring in haskell means abstraction}
12 12
 \end{itemizep}
13 13
 \vspace{\baselineskip}
14 14
 \slidep
15
-We'll have to see if this holds true.
15
+\ifger{Wir werden sehen, ob all dies zutrifft.}{We'll have to see if this holds true.}

+ 8
- 8
VL1/content/VL1_why_haskell2.tex View File

@@ -1,9 +1,9 @@
1
-From C++ std:
1
+\ifger{Aus der C++ Standard library}{From C++ std}:
2 2
 \begin{cppcode}
3 3
 void pop();
4 4
 \end{cppcode}
5 5
 \pause
6
-From the C FLINT library:
6
+\ifger{Aus der}{From the} C FLINT library:
7 7
 \begin{ccode}
8 8
 void fmpz_mod_poly_add(
9 9
     fmpz_mod_poly_t res,
@@ -12,12 +12,12 @@ void fmpz_mod_poly_add(
12 12
 \end{ccode}
13 13
 \vspace{\baselineskip}
14 14
 \pause
15
-Regular C functions in real-world (omitting examples on purpose):
15
+\ifger{Reguläre C-Funktionen im Alltag (Beispiele absichtlich unterschlagen)}{Regular C functions in real-world (omitting examples on purpose):}
16 16
 \begin{itemizep}
17 17
 \item 100+ LOC
18
-\item at least 7 ifs, 4 whiles, 12 variables, 1 goto
19
-\item accesses both static and global variables
20
-\item indenting level of 5 or more
21
-\item a lot of memory management and custom-made error handling
22
-\item references everywhere!
18
+\item \ifger{mindestens}{at least} 7 ifs, 4 whiles, 12 variables, 1 goto
19
+\item \ifger{greift sowohl auf statisch als auch auf globale Variablen zu}{accesses both static and global variables}
20
+\item indenting level \ifger{von 5 oder mehr}{of 5 or more}
21
+\item \ifger{viel Speicherverwaltung und programmspezifisches Error-Handling}{a lot of memory management and custom-made error handling}
22
+\item \ifger{überall Referenzen!}{references everywhere!}
23 23
 \end{itemizep}

+ 9
- 9
VL1/content/VL1_why_haskell3.tex View File

@@ -1,13 +1,13 @@
1
-You need to change only one single line in such a C function. You have to know:
1
+\ifger{Wir müssen nur eine einzige Zeile in dieser C Funktionen ändern. Dafür sollten wir wissen:}{You need to change only one single line in such a C function. You have to know:}
2 2
 \begin{itemizep}
3
-\item does the order of function calls matter?
4
-\item how does the change effect the memory management? Do we have memory leaks? Do we access invalid memory?
5
-\item does it change the state of static or global variables?
6
-\item does it change the state of out-parameters?
7
-\item if it changes any of those states, is the function still correct?
8
-\item what happens if the program flow reaches this code-path with variable X in that particular state, while variable Z is NULL, and...
9
-\item did you just nuke a small former Soviet state?
3
+\item \ifger{spielt die Reihenfolge der Funktionen eine Rolle?}{does the order of function calls matter?}
4
+\item \ifger{wie beeinflusst die Änderung die Speicherverwaltung? Haben wir memory leaks? Greifen wir auf unerlaubte Speicherbereiche zu?}{how does the change effect the memory management? Do we have memory leaks? Do we access invalid memory?}
5
+\item \ifger{ändern wir den Zustand von statischen oder globalen Variablen?}{does it change the state of static or global variables?}
6
+\item \ifger{ändern wir den Zustand von out-parametern?}{does it change the state of out-parameters?}
7
+\item \ifger{wenn wir irgendeine dieser Zustände ändern, ist die Funktion immer noch korrekt?}{if it changes any of those states, is the function still correct?}
8
+\item \ifger{was passiert wenn der Programmfluss diesen Code-Pfad erreicht mit Variable X in diesem Zustand, während Variable Z NULL ist und...}{what happens if the program flow reaches this code-path with variable X in that particular state, while variable Z is NULL, and...}
9
+\item \ifger{haben wir gerade einen ehemaligen Sovjetstaat bombardiert?}{did you just nuke a small former Soviet state?}
10 10
 \end{itemizep}
11 11
 \vspace{\baselineskip}
12 12
 \slidep
13
-Conclusion: you really need to understand the complete environment of that line/function.
13
+\ifger{Schlussfolgerung: wir müssen tatsächlich die vollständige Umgebung der Zeile/Funktion verstehen.}{Conclusion: you really need to understand the complete environment of that line/function.}

+ 5
- 5
VL1/content/VL1_why_haskell4.tex View File

@@ -1,7 +1,7 @@
1
-But java helps! Does it?
2
-Sort of, because:
1
+\ifger{Kann Java hier Abhilfe schaffen?}{But java helps! Does it?}
2
+\ifger{Ein wenig, denn:}{Sort of, because:}
3 3
 \begin{itemizep}
4
-\item it improves APIs compared to C, since you can hide or encapsulate information in the state of an object
5
-\item it has a garbage collector, so you don't need to worry too much about memory
6
-\item an experienced programmer will find it easier to manage side-effects in Java, because you can e.g. have every impure functions throw an IO exception
4
+\item \ifger{es ermöglicht bessere APIs im Vergleich zu C, da wir Informationen im Zustand eines Objektes verstecken bzw. kapseln können}{it improves APIs compared to C, since you can hide or encapsulate information in the state of an object}
5
+\item \ifger{es hat einen garbage collector, also müssen wir uns nicht allzu viele Sorgen um die Speicherverwaltung machen}{it has a garbage collector, so you don't need to worry too much about memory}
6
+\item \ifger{ein erfahrener Programmierer wird es teilweise einfacher finden Seiteneffekte in Java zu bewältigen, denn er kann für jede behaftete Funktion IO exceptions schmeissen}{an experienced programmer will find it easier to manage side-effects in Java, because you can e.g. have every impure functions throw an IO exception}
7 7
 \end{itemizep}

+ 6
- 6
VL1/content/VL1_why_haskell5.tex View File

@@ -1,12 +1,12 @@
1
-Unfortunately, with java we:
1
+\ifger{Leider hat Java auch einige Probleme:}{Unfortunately, with java we:}
2 2
 \begin{itemizep}
3
-\item now got even more states to keep track of (intellectual complexity?)
4
-\item have clouded the program flow... it's now about object-interaction with their explicit and implicit states and because of the increase of indirection, it might get even harder to do actual abstraction
5
-\item still have \textbf{side effects} everywhere: one object changes the state of another and vice versa, may arbitrarily write to the hard drive, do kernel calls or launch a missile
3
+\item \ifger{wir müssen uns jetzt um noch mehr Zustände kümmern (intellektuelle Komplexität?)}{now got even more states to keep track of (intellectual complexity?)}
4
+\item \ifger{wir haben den Programmfluss verschleiert... jetzt geht es um Objektinteraktion mit ihren impliziten und expliziten Zuständen und aufgrund des erhöhten Levels an Indirektion wird es teilweise noch schwieriger zu abstrahieren}{have clouded the program flow... it's now about object-interaction with their explicit and implicit states and because of the increase of indirection, it might get even harder to do actual abstraction}
5
+\item \ifger{wir haben immer noch \textbf{Seiteneffekte} überall: ein Objekt ändert den Zustand eines anderen und umgekehrt, könnte zufällig auf die Festplatte schreiben, den Kernel ansprechen oder eine Rakete starten}{still have \textbf{side effects} everywhere: one object changes the state of another and vice versa, may arbitrarily write to the hard drive, do kernel calls or launch a missile}
6 6
 \end{itemizep}
7 7
 \slidep
8
-Some parts of the implicit state machine have been made explicit by modelling classes, but it's still there and we have to deal with it, because we are modelling everything around states. Wouldn't it be nice if we could just forget about the global state machine? Maybe there is even a way to remove side effects and have more "predictability"?
8
+\ifger{Einige Teile der impliziten Zustandsmaschine haben wir explizit gemacht durch das modellieren von Klassen, aber sie ist immer noch da und wir müssen damit umgehen, weil wir alles um Zustände herum modellieren. Wäre es nicht schön, wenn wir die implizite Zustandsmaschine einfach vergessen könnten? Vielleicht gibt es sogar einen Weg Seiteneffekte vollständig zu entfernen, um mehr Vorhersagbarkeit zu haben?}{Some parts of the implicit state machine have been made explicit by modelling classes, but it's still there and we have to deal with it, because we are modelling everything around states. Wouldn't it be nice if we could just forget about the global state machine? Maybe there is even a way to remove side effects and have more "predictability"?}
9 9
 \slidep
10 10
 \vspace{\baselineskip}
11 11
 \\
12
-We are lucky. There is. It's called \textbf{Haskell}.
12
+\ifger{Wir haben Glück. Die Antwort ist: \textbf{Haskell}}{We are lucky. There is. It's called \textbf{Haskell}.}

+ 6
- 0
common/common_configuration.tex View File

@@ -1,3 +1,9 @@
1
+% language
2
+\usepackage[english,german]{babel}
3
+\usepackage{iflang}
4
+\babeltags{de = german}
5
+\newcommand{\ifger}[2]{\IfLanguageName{german}{#1}{#2}}
6
+
1 7
 % color definition
2 8
 \definecolor{solarized}{HTML}{002B36}
3 9
 \definecolor{mygreen}{HTML}{009900}

+ 6
- 6
common/content/VL_links.tex View File

@@ -1,8 +1,8 @@
1 1
 \begin{itemize}
2
-\item the most popular haskell course from Brent Yorgey:\\ \url{https://www.seas.upenn.edu/~cis194/fall14/spring13/lectures.html}
3
-\item very verbose and enthusiastic haskell book, good for reading once:\\ \url{http://learnyouahaskell.com}
4
-\item collection of websites teaching haskell:\\ \url{https://github.com/bitemyapp/learnhaskell}
5
-\item haskell programming tips (and wiki):\\ \url{https://wiki.haskell.org/Haskell_programming_tips}
6
-\item the standard module (similar to libc in C):\\ \url{https://hackage.haskell.org/package/base-4.7.0.0/docs/Prelude.html}
7
-\item debugging in haskell:\\ \url{https://wiki.haskell.org/Debugging}
2
+\item \ifger{der wohl populärste Haskell-Kurs von Brent Yorgey}{the most popular haskell course from Brent Yorgey}\footnote{\url{https://www.seas.upenn.edu/~cis194/fall14/spring13/lectures.html}}
3
+\item \ifger{sehr ausführliches und enthusiastisches Haskell-Buch, gut zum einmal lesen.}{very verbose and enthusiastic haskell book, good for reading once.}\footnote{\url{http://learnyouahaskell.com}}
4
+\item \ifger{eine Kollektion von Webseiten, mit deren Hilfe man Haskell lernen kann}{collection of websites teaching haskell}\footnote{\url{https://github.com/bitemyapp/learnhaskell}}
5
+\item \ifger{Haskell Programmiertips (und wiki)}{haskell programming tips (and wiki)}\footnote{\url{https://wiki.haskell.org/Haskell_programming_tips}}
6
+\item \ifger{Das Standardmodul (ähnlich wie libc in C)}{the standard module (similar to libc in C)}\footnote{\url{https://hackage.haskell.org/package/base-4.7.0.0/docs/Prelude.html}}
7
+\item \ifger{debuggen in Haskell}{debugging in haskell}\footnote{\url{https://wiki.haskell.org/Debugging}}
8 8
 \end{itemize}

+ 4
- 4
common/content/VL_sources.tex View File

@@ -1,6 +1,6 @@
1 1
 \begin{itemize}
2
-\item much content was borrowed or is based on the haskell course from Brent Yorgey:\\ \url{https://www.seas.upenn.edu/~cis194/fall14/spring13/lectures.html}
3
-\item a few small pieces from the LYAH book \url{http://learnyouahaskell.com}
4
-\item general information from wikipedia: \\ \url{https://en.wikipedia.org}
5
-\item general information from haskell wiki: \\ \url{https://wiki.haskell.org}
2
+\item \ifger{viel Stoff ist entlehnt von oder basiert auf dem Haskell-Kurs von Brent Yorgey}{much content was borrowed or is based on the haskell course from Brent Yorgey}\footnote{\url{https://www.seas.upenn.edu/~cis194/fall14/spring13/lectures.html}}
3
+\item \ifger{ein paar kleinere Teile aus dem LYAH Buch}{a few small pieces from the LYAH book}\footnote{\url{http://learnyouahaskell.com}}
4
+\item \ifger{allgemeine Informationen von Wikipedia}{general information from wikipedia}\footnote{\url{https://en.wikipedia.org}}
5
+\item \ifger{allgemeine Informationen vom Haskell Wiki}{general information from haskell wiki}\footnote{\url{https://wiki.haskell.org}}
6 6
 \end{itemize}