phadej/optika

Examples that humans can understand

Opened this issue · 2 comments

I'm not a set theorist, but I'm pretty sure the intersection of the sets (people who would love to use optika) and (people who are oleg) is not huge.

Some better documentation on usage in regular javascript context would help make more accessible to (people who aren't oleg).

I would love to contribute to the docs, but because I don't understand how everything works and is supposed to be used, I'm not helpful -- but if you throw some basic examples together, would love to help flesh them out.

(I realize you're still building optika so this might not be topical yet, but eventually...)

So you want a tutorial... Let's see what I can do.

Hi @jevakallio! You might remember talking with me in the first CycleConf.

If you are looking for introductory material on optics, then perhaps I can help. We've been using optics in JavaScript (front & back) for some time now already. You might even recall @milankinen mentioning lenses in his pre conf talk.

The Partial Lenses library also has fairly comprehensive documentation that also contains a brief tutorial based on a simple real-world use case. Also, if you are brave enough to wait for the interactive version of the page to render (dozens of KLIPSE (CodeMirror) snippets on a page...) you can play with the code snippets in your browser (the page seems to work smoothest if your browser is Firefox, BTW).

There is also a video of my Compositional Data Manipulation using Lenses talk.

Even though Optika is quite different from Partial Lenses and the same goes for other JS optics libraries, it should be fairly easy to move from one library to another once you understand the basic ideas. IOW, should help with the "how ... is supposed to be used" part.