Praktikum
+=======
Finish setting up sending email:
- https://wiki.archlinux.org/title/Postfix
Have a section of my obsidian that can be posted on my blog!
-More games with Lisa!
\ No newline at end of file
+More games with Lisa!
+Birthday next weekend
+
+More games with Lisa!
+
+We need to do Karaoke again! (check if they still do it!)
+
+Go to cementing CPL
+
+First Lecture notes ACC / keep up with SC
+
+First Lecture LA / notes on that
+
+answers is fun. Do that.
--- /dev/null
+# Lecture 1
+Pass / Fail. Friday 10th 23:59
+Pass requires >= 5.0 on every mand. assignment
+There are 6 of these.
+
+Basis: many, do a few /when confused
+Exam Level: Recommended to do all
+Extra: if you are interested
+
+You are going to be making an interpreter. The assignments are kinda big. 6/10 hours / week.
+
+There is a skill circuit.
+
+[Third Edition](https://plai.org)
+Loads of Lecture Notes on WebLab.
+
+## Syntax and Parsing
+
+ ------------ Semantics -------------------
+Stnax -> Parse -> Abstract Syntax -> Interpret -> Value
+------ Syntax -------------------
+
+Pages on slides (if you want to read them)
+
+### Syntax
+Program Text -> Parse -> Abstract Syntax
+
+Syntax: the arrangment of words and phrases to create well-formed sentences in a language.
+(The syntax is the structure of program phrases in a language)
+
+Abstract Syntax, often comes in tree form, therefore AST.
+
+### Grammars and Disambiguation
+Prioties, for example, associativity, maybe
+or you implement brackets in your language design.
+Or you do it based on the grammar construction
+
+We will use SDF3 grammars. (Context-Free Syntax).
+
+Higher context-free priority, means further down in the tree (i.e. something that has higher prio, it comes further down in the tree as it should be evaluated first.)
-n = a `div` length xs
- where
- a = 10
- xs = [1,2,3,4,5]
+
+
+luhnDouble :: Int -> Int
+luhnDouble a = (a * 2) `mod` 9
+
+luhn :: Int -> Int -> Int -> Int -> Bool
+luhn a b c d = ((sum [luhnDouble a, b, luhnDouble c, d]) `mod` 10) == 0
+
+luhnFinal :: Int -> Int -> Int -> Int
+luhnFinal a b c = 10 - ((sum [luhnDouble a, b, luhnDouble c]) `mod` 10)