3 ms·
This is just using the framework that I made for the exercise. The students didn't have to do any Crazy IO stuff. You can see the parts under "Aufgabe" here, wh
by def- 9y ago
This is just using the framework that I made for the exercise. The students didn't have to do any Crazy IO stuff. You can see the parts under "Aufgabe" here, which is what they were supposed to code: https://github.com/def-/gifstream/blob/master/SnakeFinished.hs#L67 https://github.com/def-/gifstream/blob/master/SnakeFinished....
Exercises in German here: https://github.com/def-/gifstream/blob/master/Aufgabe.pdf https://github.com/def-/gifstream/blob/master/Aufgabe.pdf
- maweki 9y agoThis seems interesting. Maybe I can use something similar next year to generate some interest. Without IO (which is monads, which is too advances since we also do functional C# and functional java paradigms in the same course) the subject matter is always a bit dry since the students have nothing but the ghci repl to get any interaction or feedback going.
- def- 9y agoThe most fun exercise for me was generating music in Haskell, but it was quite challenging and I remember not many students tried it.
- wyager 9y agoWhat if you were to give students some functions like imShow :: [[Int]] -> IO () playSound [Int] -> IO () ? This would give them a little more liveliness but wouldn't require them to understand anything beyond "IO () is something that the repl can run". If they're feeling exploratory, maybe give them a few monadic combinators like >> to play around with, possibly specialized to IO.
- WorldMaker 9y agoYou could also build a "sandbox" monad specifically for the class/framework. Let the students treat the monad as a blackbox Turing machine/state machine, unless they get time/interest/show aptitude to dive deeper. Doing that gives you the benefit that they don't accidentally google "Haskell IO" and fall down the monad rabbit hole without some preparation.
- mrkgnao 9y agohttps://code.world/ https://code.world/
- maweki 9y agoI wonder whether you can even hide the IO in the logic function by providing a random number from the outside which the students can use, so that from their perspective the logic function is pure, which would be quite desirable.