calmm-js / partial.lenses

Partial lenses is a comprehensive, high-performance optics library for JavaScript
MIT License
915 stars 36 forks source link

Switch playground to use e.g. Monaco editor #101

Open polytypic opened 7 years ago

polytypic commented 7 years ago

Currently the playground uses Klipse which uses CodeMirror. It works fine, but an editor like Monaco could fairly easily be configured to provide completion and online documentation.

smeijer commented 7 years ago

When working on a new playground, I think it would be awesome to add a small performance test loop to it. It doesn't need to be as advanced as jsperf, but a simple test so we can see how good a implementation of specific lenses perform.

The parsing of code in the playground can take some time, when a data object becomes larger (L.collectAs(myFn, [L.elems, 'sub', L.elems, 'path', L.choose....], largeDataObject). Being able to run the final L statement in a loop, would give some helpful feedback.

polytypic commented 7 years ago

Hmm... Interesting idea! Note that all the current interactive pages (playground, exercises, and readme) use the development (rather than production) browser build of the library, which includes extra run-time checking code and runs significantly slower than the production build. So, it might be useful to have a separate benchmarking page with the production build.