effect icon indicating copy to clipboard operation
effect copied to clipboard

Documentation? Updates? Reference?

Open datner opened this issue 3 years ago • 10 comments

I've been following this project silently since I stumbled upon it I don't even know how long ago.

I know this project is being worked on and is loved by its creators, I can see it has a healthy pulse and is evolving.

I am so eager to try using effect, but besides a few dated articles, I can't find anything that makes it possible. You can say it uses the same datatypes as this or that, or that it mirrors that one, but then I'd rather use the other options instead.

I love fp-ts, it's a miracle library that pushes ts to it's limits. But I also want to see what effect has to offer

Is there a reason why theres nothing for the public to read?

datner avatar Aug 23 '22 20:08 datner

The docs for Zio are almost a 1 to 1 conceptual and API match to Effect. IMO it would be good to mention them on the effect repo readme. You can learn pretty much all the conceptual stuff you need to know there. Obviously the syntax is a little different because it's Scala, but the concepts are all the same as Effect.

https://zio.dev/reference/

The doc strings on the functions in Effect are also well written and provide useful info. Reading the tests can give you an idea of how a particular API is applied. Those things plus the awesome Discord community have gotten me a long way!

If you love fp-ts you're going to be blown away once you realize what Effect can do. It is so much more than fp-ts and it's an absolute joy to use once you start to get the hang of it.

edit: and remember to use @effect/core as your dependency, the @effect-ts/core referenced in the readme is an old version that mirrors an older zio api IIRC. @effect/core is the newest and almost all the same functions mentioned in the zio docs are included.

evelant avatar Aug 23 '22 20:08 evelant

I've been suffering from the same issue with fp-ts, you need to go on adventures and use allegorical material try divine the syntax, practices, and gotchas. This is all well and good, and it's very good to know what you told me!!!

But today, and to an extreme in the ts world, documentation out there is very high quality, with practical teaching and common patterns, not just reference..

The resources you outlined are crutches, fallbacks, and research material. They are not enough to actually get into something as large as a framework...

Again, thanks @evelant for the tips though

datner avatar Aug 23 '22 20:08 datner

The ZIO docs are very well written and can get you nearly everything you need. They're not all category theory like a lot of fp-ts related info. They're practically docs for Effect just translated to Scala.

I agree with you however, I wish there were more Effect specific docs. They are coming but IIRC effect has undergone some large scale changes recently as it was updated to match the ZIO 2.0 API which was a really big change. I think the word on docs is they're coming once the authors feel things are settled enough. The library is mature and totally usable at this point so I hope that's soon!

I'm just getting to grips with Effect and having great success using it to refactor old unsafe imperative parts of my codebase into clean concise composed effects. Once I have more time with it under my belt I hope to contribute to documentation efforts.

It has taken some significant effort on my part to get the hang of Effect but IMO it's absolutely worth the time investment. I was previously using fp-ts and while it was useful in solving a lot of problems Effect just goes so much farther and solves many more problems much more elegantly.

I'd recommend to give the ZIO docs a read to get a feel for what Effect can do. There are really powerful capabilities that AFAIK don't exist in any other TS library. Effect really only has superficial similarities to fp-ts IMO.

Another small tip, you'll need to install @tsplus/stdlib as well. You don't have to use tsplus itself but @tsplus/stdlib contains utility types like Service, Maybe, Either, etc.

evelant avatar Aug 23 '22 21:08 evelant

I understand what you mean, and I believe you it might be worth it. But I don't know scala, for example the following is unintelligible to me image

Learning unknown framework A in language B through unknown framework A' in unknown language C is the work of ancient languages linguists, not typescript developers.. I just can't justify that much time.

This also makes it practically impossible to pitch to my workplace 😢

datner avatar Aug 23 '22 21:08 datner

Yeah definitely not something easy to pitch to a workplace without solid docs. Still totally worth the effort to learn individually IMO. It's a joy to take a few hundred lines of imperative mutable function code and reduce it to just a few lines of cleanly composed effects all while explicitly handling errors that you probably didn't even realize were there in the old code.

evelant avatar Aug 23 '22 22:08 evelant

@datner Thanks for the provoking comment, it is great to see people silently waiting for the rocket launch :) the reason can be basically reduced to: "it's my fault" I've been waiting to publish docs for multiple reasons, namely:

  • we didn't have a stable release
  • I didn't want to spend time on something that needed sure changes
  • I didn't like ANY documentation of a functional library
  • It wasn't the time to use Effect at work unless you were extremely close to the source

That said things are changing, we are now very very close to the first RC candidate and after that gets out of the door it will be my first priority to write a great documentation and start to advocate for usage of the project in workplaces

mikearnaldi avatar Aug 25 '22 11:08 mikearnaldi

We're so-so close to closing this issue. Are you excited @mikearnaldi ?

datner avatar Aug 14 '23 14:08 datner

Hey, I was just wondering if there were any updates on the docs?

erickarnis-tb avatar Aug 31 '23 20:08 erickarnis-tb

@erickarnis-tb yeah effect.website

datner avatar Aug 31 '23 21:08 datner

Thanks! They look great.

erickarnis-tb avatar Aug 31 '23 21:08 erickarnis-tb