]> git.example.dev Git - research-obsidian.git/commitdiff
updated and merged
author2weiEmu <saalbach.robert@outlook.de>
Sat, 21 Feb 2026 19:27:56 +0000 (20:27 +0100)
committer2weiEmu <saalbach.robert@outlook.de>
Sat, 21 Feb 2026 19:27:56 +0000 (20:27 +0100)
List of things to do.md
University/Concepts of Programming Languages/Concepts of Programming Languages Full Notes.md [new file with mode: 0644]
University/Functional Programming/Functional Programming Round 2 Full Notes.md
University/Functional Programming/test.hs

index 3f5753099ced82240f4a5dbad96ee2cb6a3377c2..6fdeed689852d5f3e511107a5d1eefb3f73d6a8f 100644 (file)
@@ -2,6 +2,7 @@ Stardew Valley Server
 
 Praktikum
 
+=======
 Finish setting up sending email:
 - https://wiki.archlinux.org/title/Postfix
 
@@ -25,4 +26,17 @@ Washing
 
 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.
diff --git a/University/Concepts of Programming Languages/Concepts of Programming Languages Full Notes.md b/University/Concepts of Programming Languages/Concepts of Programming Languages Full Notes.md
new file mode 100644 (file)
index 0000000..64ccd32
--- /dev/null
@@ -0,0 +1,40 @@
+# 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.)
index 6e36439b9c9da5a20012fde70d7a216b2cbb12ce..fd65f536d8c58fd2e50df4ddb645b8f410bf10cd 100644 (file)
@@ -116,3 +116,5 @@ filtering lists also works:
 we can select only elements that satisfy a boolean predicate
 `[x | x <- [1..10], even x]`
 
+
+check slides for book -> should mostly be covered though (Lec 1)
\ No newline at end of file
index e8c7970977bc638e62af5ff761197a7954e4a819..e5ec5e23583d74d30ee01b09af85eafe1249a5ea 100644 (file)
@@ -1,4 +1,10 @@
-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)