-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StateT Documentation #4126
StateT Documentation #4126
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR and fixes!
The in-depth example for StateT
is fantastic but not sure about using Eval
as a hack to suspend side-effects without IO
. Instead could we use a monad like Writer
to "print" to a List[String]
? WDYT?
Hi There,
|
Thanks for the detailed explanation :)
I appreciate that :) unfortunately, it's a stylistic choice with practical implications. Using
So my vote is for |
…s in `state.md`, weird, investigate
…cumentation/StateT
Remove the Effectful part due to `IO` dependency. Updated the public gists. Add scastie link. TODO: Table reservation system example using `Either`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the revisions!
Unfortunately, the rest of the example can't be shown here due to the | ||
required `cats-effect` dependency. We recommend to check out the rest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you consider contributing this example to the Cats Effect docs? :) I think it would be cool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I looked quickly at the cats-effects
doc site, but it's not structured in the same way as this one. I struggle to identify where we can put general IO
examples like the hangman one.
What I would like more is to extend the example
folder in the repo(or have a separate repo) with more use cases like this one, so newcomers can go, grab the code or just check it out easily. This also applies to cats
, http4s
, fs2
...Some of them have some examples, but there's nothing structured, like the TypelevelExamples
repo for instance. This sounds more like a Megathread proposal 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, I guess we'd have to add an "examples" section to the cats-effect docs. Hum.
Yes, this is totally a mega-thread issue :) Probably we need a unified Typelevel docs site + examples repo, that can show examples using multiple projects together, like cats and cats-effect. There are already a few projects for this purpose, like https://github.com/djspiewak/kitteh-redis.
I know the typelevel.org website is currently being redesigned and I had some ideas in typelevel/governance#28 that maybe we can raise some funding for improving documentation as well. Feel free to comment there or raise an issue about this topic since you seem passionate about it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll definitely have a look there 😉
Passionate...I'm just a lazy coder who likes to copy-paste code 😝 That's why I like the examples
repo idea.
Another option, instead of having a typelevel repo for examples, could be to just have a page where we collect links from individual public repositories/gists examples, like the redis above.
Pro: the maintenance is not on typelevel specifically, we just have to be sure the repos are still there and it can be done programmatically + it's faster to setup, I'm quite sure there are already tons of existing examples on Github.
Cons: we don't have control over the "working condition" of such examples, but we have to trust the developer who built them.
Basically, at the end of the day, it will be very similar to the Typelevel Ecosystem
page we already have, but for examples instead of libraries.
PS: we can also think of referring to a specific section of a larger project: "package for the http4s API of lib XYZ..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good ideas there! Once the new website lands we can try and find a home for these :)
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
…ix custom exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just a few comments, I think it's in pretty good shape! :)
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change up the reservations? Children's characters are always nice. Madeline, Elmo, Winnie-the-Pooh, etc. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all your hard work on this! This is a very nice contribution :)
Add
StateT
documentation Page to the micrositeUpdate the latest
cats
version inREADME.md
Minor source path fix
Linked to #1801