dunai
dunai copied to clipboard
Doc: Write tutorial application
There should be an easy tutorial that walks through the basic concepts and combinators. Here is an idea:
- Concept: Write an app on dunai without bearriver that allows you to launch timers that will measure when your teas are ready.
- Design: The app has two threads, connected through a wormhole.
- The first thread blocks on
readLn
and waits for the user to input new teas (data Tea = Tea { name :: String, duration :: Double }
). - The second thread collects the teas in a list, measures time and prints messages when a tea is ready.
- The first thread blocks on
- Dunai technologies used:
- Basic
MSF
s in IO - Wormholes
- List monad? (multiple teas)
- Exceptions? (messages when tea is ready)
- Basic
I'm open for alternative suggestions, even of the form "I dare you to implement xyz in dunai"!
Part of this could be in the readme itself (I've mentioned this in issue #14 ).
In my opinion, having a quick tutorial on the front page, like the lens package does, helps users a lot.
I'd vote for this first, and suggest doing this in the simplest, most accessible way possible. In particular, I would not assume that people are familiar (or even know) transformers, or arrows.
For now, these could be example from the paper.
A quick tutorial will be even shorter and easier than the tea app. Ideally something not involving time so far. That's more of a tutorial for rhine.
I wouldn't list those differences in the Changelog: The changelog indeed documents the differences between versions, but I would avoid modifying old entries in a changelog. Because the naming's already changed and the current version does not (?) conform to the naming in the paper, then it's no longer the place to do it.
I think it would be best to add the tutorial to the readme so that people can get started easily and see that as soon as they land on the main page, and a separate section to document the differences. If it's too long, maybe they can be on a separate markdown file in doc/
?
Shameless self-promotion: https://yampa-book.readthedocs.io