Skip to content

Commit

Permalink
Finally fix foreign extension links
Browse files Browse the repository at this point in the history
  • Loading branch information
nmheim committed May 21, 2024
1 parent bc60a14 commit 0b06a62
Show file tree
Hide file tree
Showing 160 changed files with 109 additions and 106 deletions.
3 changes: 3 additions & 0 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,6 @@ export default withMermaid(
}),
);

// make sure that .rkt/.hs files are linked correctly (without additional .html at the end)
process.env.VITE_EXTRA_EXTENSIONS = 'rkt,hs' // comma separated list: 'foo,bar,baz'

2 changes: 1 addition & 1 deletion exams/filetree/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ For splitting a string into a list of strings you can make use of the function `
## Haskell

For the Haskell implementation you are provided with a module
[`FTree.hs`](https://github.com/aicenter/FUP/blob/main/code/FTree.hs) which contains a `FTree` type
[`FTree.hs`](/code/FTree.hs) which contains a `FTree` type
including a `Data.Map` from keys to values. We quote the definition here:
```haskell
import Data.Map (Map)
Expand Down
2 changes: 1 addition & 1 deletion labs/lab07.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ with these notions and concepts, I implemented in Racket an interpreter of $\lam
transforming a given $\lambda$-expression into its normal form (if it exists). It follows the normal
order evaluation strategy. In addition, I implemented a few helpers functions to help you inspect
$\lambda$-expressions. You can download the interpreter:
[`lambda-calculus.rkt`](https://github.com/aicenter/FUP/blob/main/code/lambda-calculus.rkt)
[`lambda-calculus.rkt`](/code/lambda-calculus.rkt)

To follow the exercises, it is recommended to have a piece of paper, a pen, DrRacket IDE installed,
and the interpreter. To use the interpreter, download the above-mentioned file and store it in a
Expand Down
4 changes: 2 additions & 2 deletions lectures/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ due to other obligations.
| 2. | [Lists & Trees](lecture02) | Focuses on Racket lists and trees. Further, it introduces the unit testing library [Rackunit](https://docs.racket-lang.org/rackunit/index.html). | [Slides](/lectures/lecture02.pdf). [Log](/code/lecture02.rkt).|
| 3. | [Higher Order Functions](lecture03) | Deals with higher-order functions like `map`, `filter`, `foldl`, function closures and Racket structures.| [Slides](/lectures/lecture03.pdf). [Log](/code/lecture03.rkt).|
| 4. | [Lazy Evaluation](lecture04) | Introduces pattern matching, and explains how to implement lazy evaluation and streams in Racket. | [Slides](/lectures/lecture04.pdf). [Log](/code/lecture04.rkt).|
| 5. | [Macros & Interpreters](lecture05) | Briefly introduces syntactic macros, and shows how to implement interpreters (the latter is remains to be written). | [Slides](/lectures/lecture05.pdf). [Log](/code/lecture05.rkt). [Brainf*ck.rkt](https://github.com/aicenter/FUP/blob/main/code/lecture05-brainfuck.rkt). |
| 5. | [Macros & Interpreters](lecture05) | Briefly introduces syntactic macros, and shows how to implement interpreters (the latter is remains to be written). | [Slides](/lectures/lecture05.pdf). [Log](/code/lecture05.rkt). [Brainf*ck.rkt](/code/lecture05-brainfuck.rkt). |
| 6. | [Lambda Calculus](lecture06) | Describes the basics of lambda calculus to show you were most of the initial ideas for functional programming came from. | [Slides](/lectures/lecture06.pdf). [Lambda-calculus.rkt](/code/lambda-calculus.rkt). |
| Bonus | [Immutable datastructures](bonus) | For the interested reader there is another lecture on immutable datastructures like random access lists. |

Expand All @@ -29,7 +29,7 @@ due to other obligations.
| 10. | [Haskell's IO & Monads](lecture10) | Introduces Haskell's `IO` and the typeclass `Monad`. | [Slides](/lectures/lecture10.pdf). [Log](/code/lecture10.hs).|
| 11. | [Monadic Parsing](lecture11) | Uses `Functor` and `Monad` instances from the previous lecture to demonstrate the elegance of monadic parsing. | [Slides](/lectures/lecture11.pdf). [Log](/code/lecture11.hs). [`Parser.hs`](/code/Parser.hs). |
| 12. | [State Monad](lecture12) | Make repetitive, stateful boilerplate disappear via the `State` monad. | [Slides](/lectures/lecture12.pdf). [Log](/code/lecture12.hs). [`State.hs`](/code/State.hs). [`StateIO.hs`](/code/StateIO.hs). |
| 13. | [Lecture 13](lecture13) | Dissecting `foldr` into `Monoid`s and `Foldable`s. | [Slides](/lectures/lecture13.pdf). [Log](/code/lecture13.hs). [Dataset](https://github.com/aicenter/FUP/blob/main/code/FUP-hw.csv). |
| 13. | [Lecture 13](lecture13) | Dissecting `foldr` into `Monoid`s and `Foldable`s. | [Slides](/lectures/lecture13.pdf). [Log](/code/lecture13.hs). [Dataset](/code/FUP-hw.csv). |
| Bonus | [Parallel Haskell](lecture14) | Introduces Haskell's spark system and demonstrates how to use `Strategy` types for simple parallelization of existing Haskell programs. |

[`pfold.hs`](/code/pfold.hs).
Expand Down
2 changes: 1 addition & 1 deletion lectures/lecture05.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ current value is zero at the beginning of the cycle, we skip its evaluation.
```

We are done! The complete implementation of our interpreter can be found
[here](https://github.com/aicenter/FUP/blob/main/lectures/lecture05-brainfuck.rkt). Running our
[here](/code/lecture05-brainfuck.rkt). Running our
interpreter on the `add-prg` will produce the following output:
```scheme
> (run-prg add-prg '(2 3))
Expand Down
7 changes: 3 additions & 4 deletions lectures/lecture14.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,8 @@ parMap f (a:as) = do
```

With `parMap` we can solve a number of mazes with the solver from the [labs](/labs/lab12).
To run the file below you need the
[`Parser.hs`](https://github.com/aicenter/FUP/blob/main/code/Parser.hs) and
[`Mazes.hs`](https://github.com/aicenter/FUP/blob/main/code/Mazes.hs) modules.
To run the file below you need the [`Parser.hs`](/code/Parser.hs) and [`Mazes.hs`](/code/Mazes.hs)
modules.
```haskell
import System.Environment
import Control.Parallel.Strategies
Expand Down Expand Up @@ -367,7 +366,7 @@ integralchunk f step start end chunksize = sum cs
This [example is stolen from here](https://www.youtube.com/watch?v=R47959rD2yw&list=PLe7Ei6viL6jGp1Rfu0dil1JH1SHk9bgDV&index=33).

You can find a full script that compares the two approaches in
[`pfold.hs`](https://github.com/aicenter/FUP/blob/main/code/pfold.hs).
[`pfold.hs`](/code/pfold.hs).
```bash
# compile it
$ ghc -threaded -rtsopts --make pfold.hs
Expand Down
Loading

0 comments on commit 0b06a62

Please sign in to comment.