habbes / xaval

Interactive web-based playground for computer vision exploration and experimentation
https://xaval.habbes.xyz
5 stars 0 forks source link

Multiple code cells #35

Open habbes opened 6 years ago

habbes commented 6 years ago

It would be good to have multiple code cells similar to Jupyter notebooks so that the user can incrementally run and add code without having to worry about running the same code twice (which can, for example, lead to duplicate widgets).

Once concern that arises from this is how state or scope can be persisted across code cells. Since code will be eventually run in worker threads, and each code cell will be most likely compiled and executed independently, the scopes in each code cell (and on each run of a code cell) will be independent and isolated.

One approach would be to expose some shared scope object onto which the user can add values that they want to be available in all cells, similar to global variables. But I guess I'll give this more thought when I set out to work on this.

habbes commented 6 years ago

This task should be ideally tackled after implementing background code execution (issue #12).